Fixes updating books from remote instances

This commit is contained in:
Mouse Reeve
2020-11-02 09:34:46 -08:00
parent 30d5846fa4
commit 2ac9a6fcee
2 changed files with 6 additions and 5 deletions

View File

@ -69,7 +69,8 @@ def shared_inbox(request):
},
'Update': {
'Person': handle_update_user,
'Document': handle_update_book,
'Edition': handle_update_book,
'Work': handle_update_book,
},
}
activity_type = activity['type']
@ -337,7 +338,7 @@ def handle_update_book(activity):
document = activity['object']
# check if we have their copy and care about their updates
book = models.Book.objects.select_subclasses().filter(
remote_id=document['url'],
remote_id=document['id'],
sync=True,
).first()
if not book: