mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 00:04:16 +03:00
Fix issue with pagination control always displaying
This commit is contained in:
parent
25bb3b1502
commit
ae704eec58
|
@ -306,7 +306,7 @@ class PageNumberPagination(BasePagination):
|
||||||
)
|
)
|
||||||
raise NotFound(msg)
|
raise NotFound(msg)
|
||||||
|
|
||||||
if paginator.count > 1 and self.template is not None:
|
if paginator.num_pages > 1 and self.template is not None:
|
||||||
# The browsable API should display pagination controls.
|
# The browsable API should display pagination controls.
|
||||||
self.display_page_controls = True
|
self.display_page_controls = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user