Skip to content
Snippets Groups Projects
Verified Commit 2564847c authored by TheJoeCoder's avatar TheJoeCoder
Browse files

Fix UserBook save

parent 14ce6259
Branches
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ def post_save_document(sender, instance: SyncDocumentEntry, **kwargs):
@receiver(post_save, sender=UserBook)
def post_save_userbook(sender, instance: UserBook, **kwargs):
# Stop recursion
if instance.last_progress_device is not None and instance.last_progress_device.startswith("KoReader"):
if instance.last_progress_device is None or instance.last_progress_device.startswith("KoReader"):
return
# Find the corresponding SyncDocumentEntry
sync_doc_q: QuerySet[SyncDocumentEntry] = SyncDocumentEntry.objects.filter(user=instance.user, key__iexact=instance.book.partial_md5)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment