add 'any' operator
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3983 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
062ff7e851
commit
9609ca6d22
1 changed files with 7 additions and 1 deletions
|
@ -187,7 +187,13 @@ def checkOnly(value, compValue):
|
|||
def checkIn(value, compValue):
|
||||
return value in compValue
|
||||
|
||||
operators = {'only': checkOnly, 'in': checkIn}
|
||||
def checkAny(value, compValue):
|
||||
for v in value:
|
||||
if v in compValue:
|
||||
return True
|
||||
return False
|
||||
|
||||
operators = {'any': checkAny, 'in': checkIn, 'only': checkOnly}
|
||||
|
||||
|
||||
class CompoundQueryCriteria(BaseQueryCriteria, Compound):
|
||||
|
|
Loading…
Add table
Reference in a new issue