Skip to content

Commit ae704ee

Browse files
committed
Fix issue with pagination control always displaying
1 parent 25bb3b1 commit ae704ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework/pagination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def paginate_queryset(self, queryset, request, view=None):
306306
)
307307
raise NotFound(msg)
308308

309-
if paginator.count > 1 and self.template is not None:
309+
if paginator.num_pages > 1 and self.template is not None:
310310
# The browsable API should display pagination controls.
311311
self.display_page_controls = True
312312

0 commit comments

Comments
 (0)