--- a/server/rqlannotation.py Wed Jan 20 11:29:00 2010 +0100
+++ b/server/rqlannotation.py Wed Jan 20 11:29:08 2010 +0100
@@ -189,7 +189,6 @@
return rel
principal = rel
if principal is None:
- print iter(relations).next().root
raise BadRQLQuery('unable to find principal in %s' % ', '.join(
r.as_string() for r in relations))
return principal
@@ -310,7 +309,7 @@
# apply relation restriction
self.maydeambrels = maydeambrels = {}
for rel in rqlst.iget_nodes(Relation):
- if rel.is_types_restriction() or rel.r_type == 'eid':
+ if rel.r_type == 'eid' or rel.is_types_restriction():
continue
lhs, rhs = rel.get_variable_parts()
if isinstance(lhs, VariableRef) or isinstance(rhs, VariableRef):
@@ -385,9 +384,8 @@
for otheretype in otheretypes:
reltypes = frozenset(rtypefunc(otheretype))
if var.stinfo['possibletypes'] != reltypes:
- break
- else:
- self.restrict(var, var.stinfo['possibletypes'])
- self.deambification_map[var] = deambiguifier
- return True
+ return False
+ self.restrict(var, var.stinfo['possibletypes'])
+ self.deambification_map[var] = deambiguifier
+ return True
return False