web/views/basecomponents.py
changeset 8080 623432dc1deb
parent 8044 8ea1ad44ecac
child 8190 2a3c1b787688
--- a/web/views/basecomponents.py	Thu Nov 10 10:12:37 2011 +0100
+++ b/web/views/basecomponents.py	Thu Nov 10 10:13:40 2011 +0100
@@ -207,8 +207,8 @@
     to be able to filter accordingly.
     """
     __regid__ = 'etypenavigation'
-    __select__ = multi_etypes_rset() | match_form_params('__restrtype', '__restrtypes',
-                                                       '__restrrql')
+    __select__ = multi_etypes_rset() | match_form_params(
+        '__restrtype', '__restrtypes', '__restrrql')
     cw_property_defs = VISIBLE_PROP_DEF
     # don't want user to hide this component using an cwproperty
     site_wide = True
@@ -237,7 +237,7 @@
             else:
                 rqlst.save_state()
                 for select in rqlst.children:
-                    select.add_type_restriction(select.selection[0], etype)
+                    select.add_type_restriction(select.selection[0].variable, etype)
                 newrql = rqlst.as_string(self._cw.encoding, self.cw_rset.args)
                 url = self._cw.build_url(rql=newrql, __restrrql=restrrql,
                                          __restrtype=etype, __restrtypes=','.join(restrtypes))