diff -r 3079b8345915 -r 73760bbb66bd server/rqlannotation.py --- 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: