Commits

Anonymous committed 2af92e8

[svn] Paginator with mapper should leave out 'order_by' for count function.

  • Participants
  • Parent commits 4a1851f

Comments (0)

Files changed (1)

File webhelpers/pagination/orm.py

         return results
     
     def __len__(self):
-        return self.fn.count(*self.args, **self.kw)
+        kw = {}
+        for k, v in self.kw.iteritems():
+            if k != 'order_by':
+                kw[k] = v
+        return self.fn.count(*self.args, **kw)