[tableview / facets] to work properly with facet, initial table should handle case where actualrql isn't specified stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 02 Jun 2010 15:28:19 +0200
branchstable
changeset 5632 1e7c662bd6f8
parent 5631 e2e99cdf0899
child 5633 879590c52679
child 5634 e01cf2013bf1
[tableview / facets] to work properly with facet, initial table should handle case where actualrql isn't specified
web/views/tableview.py
--- a/web/views/tableview.py	Wed Jun 02 15:27:34 2010 +0200
+++ b/web/views/tableview.py	Wed Jun 02 15:28:19 2010 +0200
@@ -321,7 +321,7 @@
       displayed with default restrictions set
     """
     __regid__ = 'initialtable'
-    __select__ = nonempty_rset() & match_form_params('actualrql')
+    __select__ = nonempty_rset()
     # should not be displayed in possible view since it expects some specific
     # parameters
     title = None
@@ -329,8 +329,12 @@
     def call(self, title=None, subvid=None, headers=None, divid=None,
              displaycols=None, displayactions=None, mainindex=None):
         """Dumps a table displaying a composite query"""
-        actrql = self._cw.form['actualrql']
-        self._cw.ensure_ro_rql(actrql)
+        try:
+            actrql = self._cw.form['actualrql']
+        except KeyError:
+            actrql = self.cw_rset.printable_rql()
+        else:
+            self._cw.ensure_ro_rql(actrql)
         displaycols = self.displaycols(displaycols, headers)
         if displayactions is None and 'displayactions' in self._cw.form:
             displayactions = True