X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/7675c0b23779183eb2992c50b7d27d7248bb9a1e..14c183c7aecfdf240eb54fbaa659588e940535de:/src/api/handlers.py diff --git a/src/api/handlers.py b/src/api/handlers.py index 09269910e..d32981e04 100644 --- a/src/api/handlers.py +++ b/src/api/handlers.py @@ -179,7 +179,7 @@ class BookDetails(object): try: author, title, book_id = after.split(SORT_KEY_SEP) except ValueError: - return [] + return Book.objects.none() return books.filter(Q(sort_key_author__gt=author) | (Q(sort_key_author=author) & Q(sort_key__gt=title)) | (Q(sort_key_author=author) & Q(sort_key=title) & Q(id__gt=int(book_id))))