fix pagination for empty hits return, #732
This commit is contained in:
parent
975fabf8d1
commit
5fc8f4d7a5
|
|
@ -91,7 +91,7 @@ class ApiBaseView(APIView):
|
|||
else:
|
||||
self.status_code = 404
|
||||
|
||||
if pagination:
|
||||
if pagination and response.get("hits"):
|
||||
self.pagination_handler.validate(
|
||||
response["hits"]["total"]["value"]
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue