Skip to content

Commit

Permalink
Use update_or_create to fix existing Threads
Browse files Browse the repository at this point in the history
  • Loading branch information
maxking committed Aug 2, 2023
1 parent 536bb48 commit 21a0d51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/archive_reader/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async def _fetch_threads(self, page: int = 1):
threads = await hyperktty_client.threads(self.ml.threads)
thread_objs = []
for thread in threads.get('results'):
obj = await Thread.objects.get_or_create(
obj = await Thread.objects.update_or_create(
thread_id=thread['thread_id'], defaults=thread
)
thread_objs.append(obj[0])
Expand Down

0 comments on commit 21a0d51

Please sign in to comment.