mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54: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)
|
||||
|
||||
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.
|
||||
self.display_page_controls = True
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user