# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1234513710 -3600 # Node ID 30cb5e29a416481cd491286054bca65e6defd684 # Parent 08b82027edf84ed7832dbd798325cbde0e62309f take care, cnx may be None in which case we can't get/set session data diff -r 08b82027edf8 -r 30cb5e29a416 web/request.py --- 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"""