Fix add empty list on xxx2Many

This commit is contained in:
Cédric Krier committed 2008-10-30 15:59:30 +01:00
1 parent 0325fa6f91
commit 534cc0cdad
1 file changed
+4
+4
View File
@@ -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 ' \