Set default edition on bookwyrm import
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user