Don't store default edition in the dataase

This commit is contained in:
Mouse Reeve
2021-04-28 15:19:24 -07:00
parent ccf10e8012
commit 6551c59c45
14 changed files with 56 additions and 62 deletions

View File

@ -116,8 +116,8 @@ class AbstractConnector(AbstractMinimalConnector):
remote_id
) or models.Work.find_existing_by_remote_id(remote_id)
if existing:
if hasattr(existing, "get_default_editon"):
return existing.get_default_editon()
if hasattr(existing, "default_edition"):
return existing.default_edition
return existing
# load the json
@ -170,10 +170,6 @@ class AbstractConnector(AbstractMinimalConnector):
edition.connector = self.connector
edition.save()
if not work.default_edition:
work.default_edition = edition
work.save()
for author in self.get_authors_from_data(edition_data):
edition.authors.add(author)
if not edition.authors.exists() and work.authors.exists():