]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/utils/pagination.py
Several improvements in full text search operations.
[osqa.git] / forum / utils / pagination.py
index 2b71dbd4fefa3fc433e4e230f2ad38a4486c09ed..46c1e89c8b7d4a79fe91f3881c767148af23cbeb 100644 (file)
@@ -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