Fix OR condition
Return True at the first True result, return False if no condition match Closes #1288
This commit is contained in:
parent
b87fadf6e2
commit
4dbe7b8c5d
1 changed files with 5 additions and 5 deletions
|
|
@ -58,14 +58,14 @@ class ResultsCondition(IResultsCondition):
|
|||
different = False
|
||||
if k in d:
|
||||
if different:
|
||||
if d[k] == v:
|
||||
return False
|
||||
else:
|
||||
if d[k] != v:
|
||||
return False
|
||||
return True
|
||||
else:
|
||||
if d[k] == v:
|
||||
return True
|
||||
else:
|
||||
raise ResultsConditionError(u'Field "%s" is not valid.' % k)
|
||||
return True
|
||||
return False
|
||||
|
||||
def __str__(self):
|
||||
return unicode(self).encode('utf-8')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue