Fix "in" and "not in" clause for boolean
This commit is contained in:
1 parent
676c09aedc
commit
10b144be4e
1 file changed
+5
-4
@@ -1583,10 +1583,11 @@ class ModelSQL(ModelStorage):
|
||||
elif arg[1] in ('in', 'not in'):
|
||||
if len(arg[2]) > 0:
|
||||
todel = []
|
||||
for xitem in range(len(arg[2])):
|
||||
if arg[2][xitem] == False \
|
||||
and isinstance(arg[2][xitem],bool):
|
||||
todel.append(xitem)
|
||||
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):
|
||||
todel.append(xitem)
|
||||
arg2 = arg[2][:]
|
||||
for xitem in todel[::-1]:
|
||||
del arg2[xitem]
|
||||
|
||||
Reference in new issue
Block a user