rset.py
changeset 2381 caad2367d940
parent 2058 7ef12c03447c
parent 2352 734eb79680e9
child 2647 b0a2e779845c
--- a/rset.py	Wed Jul 15 09:45:13 2009 +0200
+++ b/rset.py	Thu Jul 16 13:30:13 2009 +0200
@@ -538,10 +538,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():