fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix for multiple agreements
[wolnelektury.git]
/
src
/
api
/
handlers.py
diff --git
a/src/api/handlers.py
b/src/api/handlers.py
index
9fb2886
..
2a12ec4
100644
(file)
--- a/
src/api/handlers.py
+++ b/
src/api/handlers.py
@@
-282,7
+282,7
@@
class BooksHandler(BookDetailHandler):
# hack, because piston is stupid
@classmethod
def liked(cls, book):
# hack, because piston is stupid
@classmethod
def liked(cls, book):
- return
book.liked
+ return
getattr(book, 'liked', None)
def read(self, request, **kwargs):
books = AnonymousBooksHandler().read(request, **kwargs)
def read(self, request, **kwargs):
books = AnonymousBooksHandler().read(request, **kwargs)
@@
-424,7
+424,7
@@
class FilterBooksHandler(BooksHandler):
# hack, because piston is stupid
@classmethod
def liked(cls, book):
# hack, because piston is stupid
@classmethod
def liked(cls, book):
- return
book.liked
+ return
getattr(book, 'liked', None)
def read(self, request):
qsp = AnonFilterBooksHandler().read(request)
def read(self, request):
qsp = AnonFilterBooksHandler().read(request)
@@
-749,7
+749,7
@@
class UserShelfHandler(BookDetailHandler):
# hack, because piston is stupid
@classmethod
def liked(cls, book):
# hack, because piston is stupid
@classmethod
def liked(cls, book):
- return
book.liked
+ return
getattr(book, 'liked', None)
def read(self, request, state):
if not request.user.is_authenticated():
def read(self, request, state):
if not request.user.is_authenticated():