minor fix for checking selection criteria
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@4135 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
310e827728
commit
dff213f94e
1 changed files with 3 additions and 2 deletions
|
@ -152,7 +152,8 @@ class LeafQueryCriteria(BaseQueryCriteria, Element):
|
|||
self.field = field
|
||||
|
||||
def check(self, row):
|
||||
if not self.comparisonValue:
|
||||
#if not self.comparisonValue:
|
||||
if self.comparisonValue in (None, '',):
|
||||
return True
|
||||
value = self.field.getSelectValue(row)
|
||||
op = operators.get(self.operator)
|
||||
|
@ -161,7 +162,7 @@ class LeafQueryCriteria(BaseQueryCriteria, Element):
|
|||
if op is None:
|
||||
# TODO: log warning
|
||||
return True
|
||||
#print '***', self.field.name, value, op, self.comparisonValue
|
||||
#print '***', self.field.name, repr(value), op, repr(self.comparisonValue)
|
||||
return op(value, self.comparisonValue)
|
||||
|
||||
def showComparisonValue(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue