rset.py
branchstable
changeset 2352 734eb79680e9
parent 1977 606923dff11b
child 2381 caad2367d940
--- a/rset.py	Thu Jul 09 14:58:19 2009 +0200
+++ b/rset.py	Thu Jul 09 14:58:55 2009 +0200
@@ -537,10 +537,12 @@
     for i, term in enumerate(rqlst.selection):
         if i == index:
             continue
-        try:
-            # XXX rewritten const
-            var = term.variable
-        except AttributeError:
+        # XXX rewritten const
+        # use iget_nodes for (hack) case where we have things like MAX(V)
+        for vref in term.iget_nodes(nodes.VariableRef):
+            var = vref.variable
+            break
+        else:
             continue
         #varname = var.name
         for ref in var.references():