Merge pull request #611 from mouse-reeve/default-edition

Don't set default edition if it's already set
This commit is contained in:
Mouse Reeve 2021-02-10 17:23:56 -08:00 committed by GitHub
commit e918ddf526
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -145,8 +145,9 @@ class AbstractConnector(AbstractMinimalConnector):
edition.connector = self.connector
edition.save()
work.default_edition = edition
work.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)