Set default edition on bookwyrm import

This commit is contained in:
Mouse Reeve
2021-01-11 10:25:34 -08:00
parent 83852e29eb
commit fe67f65307
3 changed files with 10 additions and 4 deletions

View File

@ -7,7 +7,11 @@ class Connector(AbstractMinimalConnector):
''' this is basically just for search '''
def get_or_create_book(self, remote_id):
return activitypub.resolve_remote_id(models.Edition, remote_id)
edition = activitypub.resolve_remote_id(models.Edition, remote_id)
work = edition.parent_work
work.default_edition = work.get_default_edition()
work.save()
return edition
def parse_search_data(self, data):
return data