X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/7cb7624d4864f0cb7ddce5b14879971ff97eb80e..154870f0416b6b387637d6035c96321410512e95:/src/catalogue/api/views.py?ds=sidebyside diff --git a/src/catalogue/api/views.py b/src/catalogue/api/views.py index 62876c0cc..7c4b88825 100644 --- a/src/catalogue/api/views.py +++ b/src/catalogue/api/views.py @@ -52,6 +52,11 @@ class BookList(ListAPIView): new_api = self.request.query_params.get('new_api') after = self.request.query_params.get('after', self.kwargs.get('after')) count = self.request.query_params.get('count', self.kwargs.get('count')) + if count: + try: + count = int(count) + except TypeError: + raise Http404 # Fixme if tags: if self.kwargs.get('top_level'):