From 28b4f314fd2404605ef3b7104198538aed75642e Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 27 Oct 2008 10:23:52 +0100 Subject: [PATCH] push bzr revid: fp@tinyerp.com-20081027092352-949s0q4ewrs8vuej --- bin/osv/expression.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/osv/expression.py b/bin/osv/expression.py index 7397a82e88b..54abce1b22c 100644 --- a/bin/osv/expression.py +++ b/bin/osv/expression.py @@ -232,9 +232,9 @@ class expression(object): query = '(%s OR %s IS NULL)' % (query, left) else: params = [] - if (right == False or right is None) and operator == '=': + if (((right == False) and (type(right)==bool)) or (right is None)) and (operator == '='): query = '%s IS NULL' % left - elif (right == False or right is None) and operator in ['<>', '!=']: + elif (((right == False) and (type(right)==bool)) or right is None) and (operator in ['<>', '!=']): query = '%s IS NOT NULL' % left else: if left == 'id':