[facets] DontUpdateConstraint mecanism introduced a few commit ago isn't needed: we already have the 'needs_update' property controlling this
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 01 Jul 2011 16:20:57 +0200
changeset 7609 fbefd1b9e587
parent 7608 47311917a548
child 7610 838a0c910bb5
[facets] DontUpdateConstraint mecanism introduced a few commit ago isn't needed: we already have the 'needs_update' property controlling this
web/facet.py
web/views/basecontrollers.py
--- a/web/facet.py	Fri Jul 01 16:20:45 2011 +0200
+++ b/web/facet.py	Fri Jul 01 16:20:57 2011 +0200
@@ -989,6 +989,7 @@
     .. _jquery: http://www.jqueryui.com/
     """
     attrtype = 'Float' # only numerical types are supported
+    needs_update = False # not supported actually
 
     @property
     def wdgclass(self):
@@ -1034,9 +1035,6 @@
                                              self.formatvalue(value),
                                              self.attrtype, operator)
 
-    def possible_values(self):
-        # javascript don't know how to update the widget anyway
-        raise facet.DontUpdateFacet()
 
 
 class DateRangeFacet(RangeFacet):
@@ -1087,6 +1085,7 @@
     role = 'subject' # role of filtered entity in the relation
 
     title = property(rtype_facet_title)
+    needs_update = False # not supported actually
     support_and = False
 
     def get_widget(self):
--- a/web/views/basecontrollers.py	Fri Jul 01 16:20:45 2011 +0200
+++ b/web/views/basecontrollers.py	Fri Jul 01 16:20:57 2011 +0200
@@ -505,10 +505,7 @@
             update_map = {}
             for facetid in facetids:
                 facet = facetbase.get_facet(self._cw, facetid, select, filtered_variable)
-                try:
-                    update_map[facetid] = facet.possible_values()
-                except facetbase.DontUpdateFacet:
-                    continue
+                update_map[facetid] = facet.possible_values()
             return update_map
 
     def js_unregister_user_callback(self, cbname):