diff --git a/rest_framework/pagination.py b/rest_framework/pagination.py index c54894efc5..755debea3d 100644 --- a/rest_framework/pagination.py +++ b/rest_framework/pagination.py @@ -303,12 +303,12 @@ class LimitOffsetPagination(BasePagination): template = 'rest_framework/pagination/numbers.html' def paginate_queryset(self, queryset, request, view=None): + self.count = _get_count(queryset) self.limit = self.get_limit(request) if self.limit is None: return None self.offset = self.get_offset(request) - self.count = _get_count(queryset) self.request = request if self.count > self.limit and self.template is not None: self.display_page_controls = True
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: