server/ssplanner.py
changeset 8867 6ad000b91347
parent 8748 f5027f8d2478
parent 8866 64f24ecad177
child 9206 bf642b50135b
--- a/server/ssplanner.py	Thu Apr 04 17:45:09 2013 +0200
+++ b/server/ssplanner.py	Mon Apr 08 14:45:10 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 = int(rhs.eval(plan.args))