From 33b240736cab5e2b23b8a749ac8c4df253b9fca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 19 Mar 2016 15:25:49 +0100 Subject: [PATCH] Re-introduce iteration over keys It was removed in changeset 808e05f4898c but indeed we need a copy list of the keys because the dictionary is modified during the iteration. --- trytond/model/workflow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trytond/model/workflow.py b/trytond/model/workflow.py index f8d54e283a..940eec9e48 100644 --- a/trytond/model/workflow.py +++ b/trytond/model/workflow.py @@ -33,7 +33,7 @@ class Workflow(object): result = func(cls, filtered, *args, **kwargs) if to_update: - for record in to_update: + for record in to_update.keys(): current_state = getattr(record, cls._transition_state) if current_state != to_update[record]: del to_update[record]