X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/fd5174ac564e77cabc5e1a5919f2d29f426fb261..55eea8d5a3f8fcc3a509f2eaf45005bba20fc76a:/forum/utils/pagination.py diff --git a/forum/utils/pagination.py b/forum/utils/pagination.py index 2b71dbd..46c1e89 100644 --- a/forum/utils/pagination.py +++ b/forum/utils/pagination.py @@ -34,7 +34,10 @@ class SimpleSort(SortBase): return isinstance(self.order_by, (list, tuple)) and self.order_by or [self.order_by] def apply(self, objects): - return objects.order_by(*self._get_order_by()) + if self.order_by: + return objects.order_by(*self._get_order_by()) + + return objects class PaginatorContext(object): visible_page_range = 5