Fix condition in _on_change_set method

If _on_change_set is called with a None value for a XXX2Many field, the test
designed to check for creations / updates raises an Exception because of
missing parenthesis.

issue4284
review10591002
This commit is contained in:
Jean CAVALLO
2014-10-23 18:10:55 +02:00
parent d71d529a96
commit 68f4d19ed3
+1 -1
View File
@@ -921,7 +921,7 @@ class Model(object):
for record in to_remove:
# remove without signal
list.remove(getattr(self, field), record)
if value and value.get('add') or value.get('update'):
if value and (value.get('add') or value.get('update')):
for index, vals in value.get('add', []):
relation = Model.get(self._fields[field]['relation'],
self._config)