--- a/web/request.py Wed Apr 14 10:25:51 2010 +0200
+++ b/web/request.py Wed Apr 14 10:29:38 2010 +0200
@@ -152,7 +152,7 @@
self._ = self.__ = gettext
self.lang = lang
self.debug('request language: %s', lang)
- if self.cnx is not None:
+ if self.cnx:
self.cnx.set_session_props(lang=lang)
# input form parameters management ########################################
@@ -280,7 +280,7 @@
def update_search_state(self):
"""update the current search state"""
searchstate = self.form.get('__mode')
- if not searchstate and self.cnx is not None:
+ if not searchstate and self.cnx:
searchstate = self.session.data.get('search_state', 'normal')
self.set_search_state(searchstate)
@@ -291,7 +291,7 @@
else:
self.search_state = ('linksearch', searchstate.split(':'))
assert len(self.search_state[-1]) == 4
- if self.cnx is not None:
+ if self.cnx:
self.session.data['search_state'] = searchstate
def match_search_state(self, rset):