[table view] use get instead of has_key so one can specify he doesn't want actions or filter stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 16 Sep 2010 11:26:55 +0200
branchstable
changeset 6254 936e98213598
parent 6253 30b6beb38820
child 6255 e2d51d6ba654
[table view] use get instead of has_key so one can specify he doesn't want actions or filter
web/views/tableview.py
--- a/web/views/tableview.py	Thu Sep 16 11:26:08 2010 +0200
+++ b/web/views/tableview.py	Thu Sep 16 11:26:55 2010 +0200
@@ -140,11 +140,11 @@
         if mainindex is None:
             displayfilter, displayactions = False, False
         else:
-            if displayfilter is None and 'displayfilter' in req.form:
+            if displayfilter is None and req.form.get('displayfilter'):
                 displayfilter = True
                 if req.form['displayfilter'] == 'shown':
                     hidden = False
-            if displayactions is None and 'displayactions' in req.form:
+            if displayactions is None and req.form.get('displayactions'):
                 displayactions = True
         displaycols = self.displaycols(displaycols, headers)
         fromformfilter = 'fromformfilter' in req.form