From 9609ca6d22d89cd5f022649e4d2f35fd5fffc200 Mon Sep 17 00:00:00 2001 From: helmutm Date: Wed, 8 Sep 2010 13:30:16 +0000 Subject: [PATCH] add 'any' operator git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3983 fd906abe-77d9-0310-91a1-e0d9ade77398 --- composer/report/base.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/composer/report/base.py b/composer/report/base.py index 1e119db..99358d4 100644 --- a/composer/report/base.py +++ b/composer/report/base.py @@ -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):