[web] search state doesn't need cnx, remove useless test
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 11 Sep 2012 12:44:33 +0200
changeset 8541 5b6bc27ece6e
parent 8540 fee98af8bb33
child 8542 7e264ce34cd4
[web] search state doesn't need cnx, remove useless test
web/request.py
--- a/web/request.py	Mon Sep 10 17:31:07 2012 +0200
+++ b/web/request.py	Tue Sep 11 12:44:33 2012 +0200
@@ -357,7 +357,7 @@
     def update_search_state(self):
         """update the current search state"""
         searchstate = self.form.get('__mode')
-        if not searchstate and self.cnx:
+        if not searchstate:
             searchstate = self.session.data.get('search_state', 'normal')
         self.set_search_state(searchstate)
 
@@ -368,8 +368,7 @@
         else:
             self.search_state = ('linksearch', searchstate.split(':'))
             assert len(self.search_state[-1]) == 4
-        if self.cnx:
-            self.session.data['search_state'] = searchstate
+        self.session.data['search_state'] = searchstate
 
     def match_search_state(self, rset):
         """when searching an entity to create a relation, return True if entities in