fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use class-based generic views
[wolnelektury.git]
/
apps
/
api
/
handlers.py
diff --git
a/apps/api/handlers.py
b/apps/api/handlers.py
index
91a3f4b
..
437b3be
100644
(file)
--- a/
apps/api/handlers.py
+++ b/
apps/api/handlers.py
@@
-106,7
+106,7
@@
class BookDetails(object):
@classmethod
def author(cls, book):
@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):
@classmethod
def href(cls, book):
@@
-410,7
+410,7
@@
class CatalogueHandler(BaseHandler):
def book_dict(book, fields=None):
all_fields = ['url', 'title', 'description',
'gazeta_link', 'wiki_link',
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',
'parent', 'parent_number',
'tags',
'license', 'license_description', 'source_name',