From 841e0183fa36de1b9d1574bbd812977733a5781e Mon Sep 17 00:00:00 2001 From: oliver Date: Thu, 6 Sep 2018 14:49:28 +0900 Subject: [PATCH] Clean up unnecessary if statement --- rest_framework/pagination.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rest_framework/pagination.py b/rest_framework/pagination.py index 1c57f17d31..c3494e3c59 100644 --- a/rest_framework/pagination.py +++ b/rest_framework/pagination.py @@ -544,12 +544,11 @@ def paginate_queryset(self, queryset, request, view=None): has_following_position = False following_position = None - # If we have a reverse queryset, then the query ordering was in reverse - # so we need to reverse the items again before returning them to the user. if reverse: + # If we have a reverse queryset, then the query ordering was in reverse + # so we need to reverse the items again before returning them to the user. self.page = list(reversed(self.page)) - if reverse: # Determine next and previous positions for reverse cursors. self.has_next = (current_position is not None) or (offset > 0) self.has_previous = has_following_position