work around a pb. with subquery_selection_index stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Wed, 21 Oct 2009 11:21:58 +0200
branchstable
changeset 3766 9e5dc4b1ada4
parent 3765 769dc0107f31
child 3767 03924de0014d
work around a pb. with subquery_selection_index
rset.py
--- a/rset.py	Wed Oct 21 11:19:54 2009 +0200
+++ b/rset.py	Wed Oct 21 11:21:58 2009 +0200
@@ -505,6 +505,9 @@
         # UNION query, find the subquery from which this entity has been found
         select = rqlst.locate_subquery(locate_query_col, etype, self.args)[0]
         col = rqlst.subquery_selection_index(select, col)
+        if col is None:
+            # XXX unexpected, should fix subquery_selection_index ?
+            return None, None
         try:
             myvar = select.selection[col].variable
         except AttributeError: