web/views/navigation.py
changeset 4357 ef8e20bfa287
parent 4336 45e5b8bd2f71
child 4382 6fb02edd05da
--- a/web/views/navigation.py	Tue Jan 26 10:28:30 2010 +0100
+++ b/web/views/navigation.py	Tue Jan 26 10:29:50 2010 +0100
@@ -200,6 +200,8 @@
     req = view._cw
     if rset is None:
         rset = view.cw_rset
+    if w is None:
+        w = view.w
     nav = req.vreg['components'].select_or_none(
         'navigation', req, rset=rset, page_size=page_size)
     if nav:
@@ -223,7 +225,7 @@
     display everything (by setting __force_display in req.form)
     """
     if view.paginable and not view._cw.form.get('__force_display'):
-        do_paginate(view, rset, w or view.w, show_all_option, page_size)
+        do_paginate(view, rset, w, show_all_option, page_size)
 
 # monkey patch base View class to add a .paginate([...])
 # method to be called to write pages index in the view and then limit the result