Fix usage of None in "in" clause

This commit is contained in:
Cédric Krier committed 2012-04-12 17:51:50 +02:00
1 parent acbfff179c
commit 1a5b2aacd7
1 file changed
+2 -2
+2 -2
View File
@@ -1733,8 +1733,8 @@ class ModelSQL(ModelStorage):
todel = []
if table._columns[arg[0]]._type != 'boolean':
for xitem in range(len(arg[2])):
if (arg[2][xitem] == False
and isinstance(arg[2][xitem], bool)):
if (arg[2][xitem] is False
or arg[2][xitem] is None):
todel.append(xitem)
arg2 = arg[2][:]
for xitem in todel[::-1]: