mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-27 12:01:14 +00:00
Set work author for editions with no author
This commit is contained in:
parent
75a589571c
commit
68372c3c43
1 changed files with 3 additions and 0 deletions
|
@ -119,6 +119,9 @@ class Connector(AbstractConnector):
|
||||||
author_id = author_blob['key']
|
author_id = author_blob['key']
|
||||||
author_id = author_id.split('/')[-1]
|
author_id = author_id.split('/')[-1]
|
||||||
book.authors.add(self.get_or_create_author(author_id))
|
book.authors.add(self.get_or_create_author(author_id))
|
||||||
|
if not data.get('authors'):
|
||||||
|
book.authors.set(book.parent_work.authors.all())
|
||||||
|
|
||||||
|
|
||||||
if book.sync_cover and data.get('covers') and len(data['covers']):
|
if book.sync_cover and data.get('covers') and len(data['covers']):
|
||||||
book.cover.save(*self.get_cover(data['covers'][0]), save=True)
|
book.cover.save(*self.get_cover(data['covers'][0]), save=True)
|
||||||
|
|
Loading…
Reference in a new issue