mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
remove hardcoded page number
This commit is contained in:
parent
3819ae35ac
commit
fe5d93c8cb
|
@ -122,7 +122,6 @@ class GenericAPIView(views.APIView):
|
||||||
else:
|
else:
|
||||||
raise NotFound(_("Choose a valid page number. Page numbers must be a whole number, or must be the string 'last'."))
|
raise NotFound(_("Choose a valid page number. Page numbers must be a whole number, or must be the string 'last'."))
|
||||||
|
|
||||||
page_number = -1
|
|
||||||
try:
|
try:
|
||||||
page = paginator.page(page_number)
|
page = paginator.page(page_number)
|
||||||
except InvalidPage as exc:
|
except InvalidPage as exc:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user