KERNEL: fix where calc for list index out of range when deleting false items
bzr revid: ced-1fa9970b0e09d025a10625a8d7def51644299041
This commit is contained in:
parent
071fd71878
commit
adc88a72dc
|
@ -1303,10 +1303,11 @@ class orm(object):
|
|||
qu1.append('(%s.%s %s %s)' % (table._table, x[0], x1, table._columns[x[0]]._symbol_set[0]))
|
||||
elif x[1]=='in':
|
||||
if len(x[2])>0:
|
||||
todel = False
|
||||
todel = []
|
||||
for xitem in range(len(x[2])):
|
||||
if x[2][xitem]==False and isinstance(x[2][xitem],bool):
|
||||
todel = xitem
|
||||
todel.append(xitem)
|
||||
for xitem in todel[::-1]:
|
||||
del x[2][xitem]
|
||||
if x[0]=='id':
|
||||
qu1.append('(id=any(array[%s]))' % (','.join(['%d'] * len(x[2])),))
|
||||
|
|
Loading…
Reference in New Issue