Commit 8a626b1f authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

in case of non-list value, use '== value' instead of 'in value'.

currently, we cannot specify '[value]' for quantity identity_criterion, and need to specify float itself as its value.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28841 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1a3300df
......@@ -108,7 +108,10 @@ class Predicate(XMLObject, Folder):
# 'testing %s on context of %s' % \
# (self.getRelativeUrl(), context.getRelativeUrl()))
for property, value in self._identity_criterion.iteritems():
if isinstance(value, (list, tuple)):
result = result and (context.getProperty(property) in value)
else:
result = result and (context.getProperty(property) == value)
# LOG('predicate test', 0,
# '%s after prop %s : %s == %s' % \
# (result, property, context.getProperty(property), value))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment