server/sources/rql2sql.py
branchstable
changeset 3866 2783c166ad1a
parent 3852 03121ca1f85e
child 3987 f85ef29f6214
--- a/server/sources/rql2sql.py	Mon Nov 16 18:10:51 2009 +0100
+++ b/server/sources/rql2sql.py	Mon Nov 16 18:36:31 2009 +0100
@@ -171,8 +171,11 @@
             for invvar, vartype in invariants[id(sol)].iteritems():
                 sol[invvar] = vartype
         for sol in existssols:
-            for invvar, vartype in invariants[id(sol)].iteritems():
-                sol[invvar] = vartype
+            try:
+                for invvar, vartype in invariants[id(sol)].iteritems():
+                    sol[invvar] = vartype
+            except KeyError:
+                continue
     if len(newsols) > 1:
         if rewrite_unstable_outer_join(rqlst, newsols, unstable, schema):
             # remove variables extracted to subqueries from solutions