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.
This commit is contained in:
Cédric Krier committed 2016-03-19 15:25:49 +01:00
1 parent 23c45fc511
commit 33b240736c
1 file changed
+1 -1
+1 -1
View File
@@ -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]