Fix = False for boolean to not use is NULL
This commit is contained in:
1 parent
dd2cceed23
commit
1339a52dc2
1 file changed
+6
-2
+6
-2
@@ -2399,8 +2399,12 @@ class ORM(object):
|
||||
qu1.append(' false')
|
||||
else:
|
||||
if (arg[2] is False) and (arg[1] == '='):
|
||||
qu1.append('(%s.%s IS NULL)' % \
|
||||
(table._table, arg[0]))
|
||||
if table._columns[arg[0]]._type == 'boolean':
|
||||
qu1.append('(%s.%s = false)' % \
|
||||
(table._table, arg[0]))
|
||||
else:
|
||||
qu1.append('(%s.%s IS NULL)' % \
|
||||
(table._table, arg[0]))
|
||||
elif (arg[2] is False) and (arg[1] == '<>' or arg[1] == '!='):
|
||||
qu1.append('(%s.%s IS NOT NULL)' % \
|
||||
(table._table, arg[0]))
|
||||
|
||||
Reference in new issue
Block a user