web/request.py
changeset 610 30cb5e29a416
parent 495 f8b1edfe9621
child 662 6f867ab70e3d
--- a/web/request.py	Fri Feb 13 09:28:04 2009 +0100
+++ b/web/request.py	Fri Feb 13 09:28:30 2009 +0100
@@ -201,7 +201,7 @@
     def update_search_state(self):
         """update the current search state"""
         searchstate = self.form.get('__mode')
-        if not searchstate:
+        if not searchstate and self.cnx is not None:
             searchstate = self.get_session_data('search_state', 'normal')
         self.set_search_state(searchstate)
 
@@ -212,7 +212,8 @@
         else:
             self.search_state = ('linksearch', searchstate.split(':'))
             assert len(self.search_state[-1]) == 4
-        self.set_session_data('search_state', searchstate)
+        if self.cnx is not None:
+            self.set_session_data('search_state', searchstate)
 
     def update_breadcrumbs(self):
         """stores the last visisted page in session data"""