server/rqlannotation.py
branchstable
changeset 6940 1172c25655b7
parent 6297 23c1e50ff97b
child 7041 5a6fd60f7617
--- a/server/rqlannotation.py	Fri Feb 04 10:02:48 2011 +0100
+++ b/server/rqlannotation.py	Sun Feb 06 11:33:04 2011 +0100
@@ -195,7 +195,7 @@
     for rel in sorted(relations, key=lambda x: (x.children[0].name, x.r_type)):
         # only equality relation with a variable as rhs may be principal
         if rel.operator() not in ('=', 'IS') \
-               or not isinstance(rel.children[1].children[0], VariableRef):
+               or not isinstance(rel.children[1].children[0], VariableRef) or rel.neged(strict=True):
             continue
         if rel.scope is rel.stmt:
             return rel