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:
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user