Simplify default edition logic

This commit is contained in:
Mouse Reeve
2020-03-31 10:19:44 -07:00
parent 3cc948a55b
commit ca26a712c3
2 changed files with 8 additions and 15 deletions

View File

@ -44,7 +44,7 @@ def get_book(book):
'published_date': book.published_date.isoformat() if \
book.published_date else None,
'parent_work': book.parent_work.absolute_id if \
book.parent_work else None,
hasattr(book, 'parent_work') else None,
}
for field in fields:
if hasattr(book, field):