[views/facets] backout 82d76492e21e - this was not actually needed and caused some problems ... stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Wed, 26 Oct 2011 17:58:21 +0200
branchstable
changeset 8025 11caeed5ae80
parent 8023 047e62cddee0
child 8026 98222e3bb804
child 8031 dcc2b6a517a0
[views/facets] backout 82d76492e21e - this was not actually needed and caused some problems ...
web/views/facets.py
--- a/web/views/facets.py	Wed Oct 26 14:11:30 2011 +0200
+++ b/web/views/facets.py	Wed Oct 26 17:58:21 2011 +0200
@@ -27,7 +27,6 @@
                                 match_context_prop, yes, relation_possible)
 from cubicweb.utils import json_dumps
 from cubicweb.web import component, facet as facetbase
-from cubicweb.rqlrewrite import add_types_restriction
 
 def facets(req, rset, context, mainvar=None):
     """return the base rql and a list of widgets for facets applying to the
@@ -54,17 +53,6 @@
     # union not yet supported
     if len(origqlst.children) != 1:
         return None, ()
-
-    # Add type restriction to rql. This allow the get_type() method to return
-    # useful value on variable extracted from a select statement.
-    #
-    # This is done on origqlst to ensure all rql related objects are properly
-    # enriched when handled by a Facet:
-    #    - the rset.syntax_tree() during selection
-    #    - the select during selection
-    #    - the select during filtering
-
-    add_types_restriction(req.vreg.schema, origqlst.children[0])
     rqlst = origqlst.copy()
     select = rqlst.children[0]
     filtered_variable, baserql = facetbase.init_facets(rset, select, mainvar)