server/ssplanner.py
brancholdstable
changeset 8853 f61755c05c89
parent 8127 96d343a5e01b
child 8866 64f24ecad177
--- a/server/ssplanner.py	Wed Aug 01 10:30:48 2012 +0200
+++ b/server/ssplanner.py	Mon Apr 08 11:09:50 2013 +0200
@@ -79,7 +79,12 @@
     checkread = session.read_security
     eschema = session.vreg.schema.eschema
     for rel in rqlst.where.get_nodes(Relation):
-        if rel.r_type == 'eid' and not rel.neged(strict=True):
+        # only care for 'eid' relations ...
+        if (rel.r_type == 'eid'
+            # ... that are not part of a NOT clause ...
+            and not rel.neged(strict=True)
+            # ... and where eid is specified by '=' operator.
+            and rel.children[1].operator == '='):
             lhs, rhs = rel.get_variable_parts()
             if isinstance(rhs, Constant):
                 eid = typed_eid(rhs.eval(plan.args))