web/views/navigation.py
changeset 4059 f1da1a7ef29b
parent 4045 f4a52abb6f4f
parent 4057 a5ec0475601e
child 4072 ead446e70c28
--- a/web/views/navigation.py	Tue Dec 08 19:17:57 2009 +0100
+++ b/web/views/navigation.py	Tue Dec 08 19:22:45 2009 +0100
@@ -173,8 +173,9 @@
 View.pagination = deprecated('.pagination is deprecated, use paginate')(limit_rset_using_paged_nav)
 
 def paginate(view, show_all_option=True, w=None, page_size=None, rset=None):
-    rset = rset or view.cw_rset
-    limit_rset_using_paged_nav(view, view._cw, view.cw_rset, w or view.w,
+    if rset is None:
+        rset = view.rset
+    limit_rset_using_paged_nav(view, view.req, rset, w or view.w,
                                not view.need_navigation, show_all_option,
                                page_size=page_size)
 View.paginate = paginate