Fix add empty list on xxx2Many
This commit is contained in:
1 parent
0325fa6f91
commit
534cc0cdad
1 file changed
+4
@@ -423,6 +423,8 @@ class One2Many(Column):
|
||||
ids = [act[1]]
|
||||
else:
|
||||
ids = list(act[1])
|
||||
if not ids:
|
||||
continue
|
||||
cursor.execute('UPDATE "' + _table + '" ' \
|
||||
'SET "' + self._field + '" = %s ' \
|
||||
'WHERE id IN (' \
|
||||
@@ -536,6 +538,8 @@ class Many2Many(Column):
|
||||
ids = [act[1]]
|
||||
else:
|
||||
ids = list(act[1])
|
||||
if not ids:
|
||||
continue
|
||||
cursor.execute('SELECT "' + self.target + '" ' \
|
||||
'FROM "' + self._rel + '" ' \
|
||||
'WHERE ' + self.origin + ' = %s ' \
|
||||
|
||||
Reference in new issue
Block a user