# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1231769571 -3600 # Node ID aa180daa2bd47f89ca5e2121130af22b57bc1c5a # Parent 4e23b542f8ad6f3c29974dd06fb4725a63998e8e this should have been in 3.0.1 diff -r 4e23b542f8ad -r aa180daa2bd4 server/querier.py --- 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)) diff -r 4e23b542f8ad -r aa180daa2bd4 server/test/unittest_security.py --- 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, [])