server/rqlannotation.py
changeset 5173 73760bbb66bd
parent 5004 4cc020ee70e2
child 5423 e15abfdcce38
--- a/server/rqlannotation.py	Wed Apr 07 09:45:15 2010 +0200
+++ b/server/rqlannotation.py	Wed Apr 07 09:24:00 2010 +0200
@@ -339,11 +339,7 @@
     def set_rel_constraint(self, term, rel, etypes_func):
         if isinstance(term, VariableRef) and self.is_ambiguous(term.variable):
             var = term.variable
-            if var.stinfo['typerel'] is not None:
-                sub = 1
-            else:
-                sub = 0
-            if len(var.stinfo['relations']) - sub == 1 \
+            if len(var.stinfo['relations']) == 1 \
                    or rel.sqlscope is var.sqlscope or rel.r_type == 'identity':
                 self.restrict(var, frozenset(etypes_func()))
                 try: