From 68f4d19ed38735017f00da87ce9a8287c7d1ef03 Mon Sep 17 00:00:00 2001 From: Jean CAVALLO Date: Thu, 23 Oct 2014 18:10:55 +0200 Subject: [PATCH] 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 --- proteus/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proteus/__init__.py b/proteus/__init__.py index 812e0ebb9b..2fc45289d1 100644 --- a/proteus/__init__.py +++ b/proteus/__init__.py @@ -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)