mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
Revert "Now throws a 404 if page isn't an int"
This reverts commit ae059c78da
.
This commit is contained in:
parent
8136a94ebe
commit
20a95db60a
|
@ -713,7 +713,7 @@ class PaginatorMixin(object):
|
|||
try:
|
||||
page_num = int(self.request.GET.get('page', '1'))
|
||||
except ValueError:
|
||||
raise ErrorResponse(status.HTTP_404_NOT_FOUND, {'detail': 'That page contains no results'})
|
||||
page_num = 1
|
||||
|
||||
if page_num not in paginator.page_range:
|
||||
raise ErrorResponse(status.HTTP_404_NOT_FOUND, {'detail': 'That page contains no results'})
|
||||
|
|
Loading…
Reference in New Issue
Block a user