--- a/server/querier.py Mon Jan 12 11:00:17 2009 +0100
+++ b/server/querier.py Mon Jan 12 15:12:51 2009 +0100
@@ -44,6 +44,7 @@
for rel in restriction.iget_nodes(Relation):
cmp = rel.children[1]
if rel.r_type == 'eid' and cmp.operator == '=' and \
+ not rel.neged(strict=True) and \
isinstance(cmp.children[0], Constant) and \
cmp.children[0].type == 'Substitute':
varkwargs[rel.children[0].name] = typed_eid(cmp.children[0].eval(args))
--- a/server/test/unittest_security.py Mon Jan 12 11:00:17 2009 +0100
+++ b/server/test/unittest_security.py Mon Jan 12 15:12:51 2009 +0100
@@ -253,7 +253,7 @@
self.assertEquals(rset.rows, [[aff2]])
# more cache test w/ NOT eid
rset = cu.execute('Affaire X WHERE NOT X eid %(x)s', {'x': eid}, 'x')
- self.assertEquals(rset.rows, [])
+ self.assertEquals(rset.rows, [[aff2]])
rset = cu.execute('Affaire X WHERE NOT X eid %(x)s', {'x': aff2}, 'x')
self.assertEquals(rset.rows, [])