Commit ea3b22bb authored by Julien Muchembled's avatar Julien Muchembled

Do not modify a container while iterating on it

objectValues does not always return a list. When it is called without any
parameter, a LazyMap object is returned and objects must not be deleted while
iterating on it: otherwise, objectValues may not return all objects.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29140 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a63b5c50
......@@ -266,7 +266,7 @@ class SimulationMovement(Movement):
if ref and ref not in applicable_rule_dict:
applicable_rule_dict[ref] = rule
for applied_rule in self.objectValues():
for applied_rule in list(self.objectValues()):
rule = applied_rule.getSpecialiseValue()
if not applied_rule._isTreeDelivered() and not rule.test(self):
self._delObject(applied_rule.getId())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment