web/views/facets.py
branchstable
changeset 2340 65445ae67db0
parent 2339 00b704535984
child 2381 caad2367d940
--- a/web/views/facets.py	Wed Jul 08 13:59:22 2009 +0200
+++ b/web/views/facets.py	Wed Jul 08 16:21:31 2009 +0200
@@ -172,8 +172,11 @@
         rqlst.save_state()
         try:
             _cleanup_rqlst(rqlst, self.filtered_variable)
-            _prepare_vocabulary_rqlst(rqlst, self.filtered_variable, self.rtype, self.role)
-            return [x.name for x in self.rqlexec(rqlst.as_string()).entities()]
+            etype_var = _prepare_vocabulary_rqlst(rqlst, self.filtered_variable, self.rtype, self.role)
+            attrvar = rqlst.make_variable()
+            rqlst.add_selected(attrvar)
+            rqlst.add_relation(etype_var, 'name', attrvar)
+            return [etype for _, etype in self.rqlexec(rqlst.as_string())]
         finally:
             rqlst.recover()