[web/request] simplify search_state loading, fix comment
authorJulien Cristau <julien.cristau@logilab.fr>
Mon, 09 Feb 2015 12:52:15 +0100
changeset 10275 d6131c5045be
parent 10274 1f84295bfe95
child 10276 ffb269e60348
[web/request] simplify search_state loading, fix comment
web/request.py
--- a/web/request.py	Wed Jan 28 09:46:55 2015 +0100
+++ b/web/request.py	Mon Feb 09 12:52:15 2015 +0100
@@ -354,14 +354,14 @@
 
     def _load_search_state(self, searchstate):
         if searchstate is None or searchstate == 'normal':
-            self._search_state = (searchstate or 'normal',)
+            self._search_state = ('normal',)
         else:
             self._search_state = ('linksearch', searchstate.split(':'))
             assert len(self._search_state[-1]) == 4, 'invalid searchstate'
 
     @property
     def search_state(self):
-        """search state: 'normal' or 'linksearch' (eg searching for an object
+        """search state: 'normal' or 'linksearch' (i.e. searching for an object
         to create a relation with another)"""
         if self._search_state is None:
             searchstate = self.session.data.get('search_state', 'normal')