@classmethod
def author(cls, book):
- return ",".join(t[0] for t in book.related_info()['tags']['author'])
+ return ",".join(t[0] for t in book.related_info()['tags'].get('author', []))
@classmethod
def href(cls, book):
def book_dict(book, fields=None):
all_fields = ['url', 'title', 'description',
'gazeta_link', 'wiki_link',
- ] + Book.formats + BookMedia.formats + [
+ ] + Book.formats + BookMedia.formats.keys() + [
'parent', 'parent_number',
'tags',
'license', 'license_description', 'source_name',