backport stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 21 Oct 2011 17:47:29 +0200
changeset 667 4a0bbee051e0
parent 664 e359c3e27b9d (current diff)
parent 666 8828046c2d3b (diff)
child 668 b2e231cbd9da
backport stable
--- a/ChangeLog	Thu Sep 08 18:13:39 2011 +0200
+++ b/ChangeLog	Fri Oct 21 17:47:29 2011 +0200
@@ -1,8 +1,14 @@
 ChangeLog for RQL
 =================
 
+--
+    * #78681: don't crash on column aliases used in outer join
+
+
 2011-09-07  --  0.30.1
-    * #74727: allow entity types to end with a capitalized letter provided they contain a lower-cased letter
+
+    * #74727: allow entity types to end with a capitalized letter
+      provided they contain a lower-cased letter
 
 
 
--- a/stcheck.py	Thu Sep 08 18:13:39 2011 +0200
+++ b/stcheck.py	Fri Oct 21 17:47:29 2011 +0200
@@ -546,12 +546,14 @@
                                 vargraph.setdefault(v2, []).append(v1)
                 if term.optional in ('left', 'both'):
                     for var in lhsvariables:
-                        optcomps = var.stinfo['attrvar'].stinfo.setdefault('optcomparisons', set())
-                        optcomps.add(term)
+                        if var.stinfo['attrvar'] is not None:
+                            optcomps = var.stinfo['attrvar'].stinfo.setdefault('optcomparisons', set())
+                            optcomps.add(term)
                 if term.optional in ('right', 'both'):
                     for var in rhsvariables:
-                        optcomps = var.stinfo['attrvar'].stinfo.setdefault('optcomparisons', set())
-                        optcomps.add(term)
+                        if var.stinfo['attrvar'] is not None:
+                            optcomps = var.stinfo['attrvar'].stinfo.setdefault('optcomparisons', set())
+                            optcomps.add(term)
 
     def rewrite_shared_optional(self, exists, var, identity_rel_scope=None):
         """if variable is shared across multiple scopes, need some tree