web/facet.py
changeset 8696 0bb18407c053
parent 8598 95b3792a8947
child 8719 539ed3fb27cb
--- a/web/facet.py	Thu Feb 14 15:38:25 2013 +0100
+++ b/web/facet.py	Thu Feb 14 16:01:24 2013 +0100
@@ -154,7 +154,7 @@
     for term in select.selection[:]:
         select.remove_selected(term)
     # remove unbound variables which only have some type restriction
-    for dvar in select.defined_vars.values():
+    for dvar in list(select.defined_vars.itervalues()):
         if not (dvar is filtered_variable or dvar.stinfo['relations']):
             select.undefine_variable(dvar)
     # global tree config: DISTINCT, LIMIT, OFFSET
@@ -303,7 +303,7 @@
         # optional relation
         return ovar
     if all(rdef.cardinality[cardidx] in '1+'
-           for rdef in rschema.rdefs.values()):
+           for rdef in rschema.rdefs.itervalues()):
         # mandatory relation without any restriction on the other variable
         for orel in ovar.stinfo['relations']:
             if rel is orel: