domains: allow None to be passed as right operand of a leaf (produce a IS NULL sql statement)
bzr revid: christophe@tinyerp.com-20081014121447-imaosx152kodnwpd
This commit is contained in:
parent
0b13461114
commit
c39db9af1a
|
@ -232,9 +232,9 @@ class expression(object):
|
|||
query = '(%s OR %s IS NULL)' % (query, left)
|
||||
else:
|
||||
params = []
|
||||
if right is False and operator == '=':
|
||||
if (right == False or right is None) and operator == '=':
|
||||
query = '%s IS NULL' % left
|
||||
elif right is False and operator in ['<>', '!=']:
|
||||
elif (right == False or right is None) and operator in ['<>', '!=']:
|
||||
query = '%s IS NOT NULL' % left
|
||||
else:
|
||||
if left == 'id':
|
||||
|
|
Loading…
Reference in New Issue