server/ssplanner.py
branchstable
changeset 8866 64f24ecad177
parent 8697 574bb05e40a4
parent 8853 f61755c05c89
child 8867 6ad000b91347
--- a/server/ssplanner.py	Wed Apr 03 10:55:56 2013 +0200
+++ b/server/ssplanner.py	Mon Apr 08 14:18:32 2013 +0200
@@ -76,7 +76,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))