Catch TypeError when evaluating leaf in domain inversion
Some values are comparable for Python but valid for Tryton domain like the datetime.* and None. issue5163 review16881003
This commit is contained in:
1 parent
c9572763e1
commit
e7ef43d9c0
1 file changed
+4
-1
@@ -89,7 +89,10 @@ def eval_leaf(part, context, boolop=operator.and_):
|
||||
'=': 'in',
|
||||
'!=': 'not in',
|
||||
}[operand]
|
||||
return OPERATORS[operand](context_field, value)
|
||||
try:
|
||||
return OPERATORS[operand](context_field, value)
|
||||
except TypeError:
|
||||
return False
|
||||
|
||||
|
||||
def inverse_leaf(domain):
|
||||
|
||||
Reference in new issue
Block a user