Fix issue with pagination control always displaying

This commit is contained in:
Tom Christie 2015-06-03 11:35:03 +01:00
parent 25bb3b1502
commit ae704eec58

View File

@ -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