Commit 229b4d30 authored by Julien Muchembled's avatar Julien Muchembled

builder: fix random "AttributeError: getCompletedStateList"

Simulation Movements use 'causality' to link to different portal types:
- Business Link
- Trade Model Path
- amount generator line/cell

Only Business Links implement getCompletedStateList.
parent 1c451d99
...@@ -652,7 +652,7 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin): ...@@ -652,7 +652,7 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin):
path='%s/%%' % self.getPath().replace('_', r'\_')) path='%s/%%' % self.getPath().replace('_', r'\_'))
for movement in catalog_simulation_movement_list: for movement in catalog_simulation_movement_list:
path = movement.getCausalityValue() path = movement.getCausalityValue(portal_type='Business Link')
if not isBuiltAndCompleted(movement, path): if not isBuiltAndCompleted(movement, path):
return False return False
updateTree(movement, path) updateTree(movement, path)
...@@ -678,7 +678,7 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin): ...@@ -678,7 +678,7 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin):
# we had not visited it in step #2 # we had not visited it in step #2
subdocument = document._getOb(id) subdocument = document._getOb(id)
if subdocument.getPortalType() == "Simulation Movement": if subdocument.getPortalType() == "Simulation Movement":
path = subdocument.getCausalityValue() path = subdocument.getCausalityValue(portal_type='Business Link')
t = (subdocument, path) t = (subdocument, path)
tree_node.visited_movement_dict[id] = t tree_node.visited_movement_dict[id] = t
if path in path_set_to_check: if path in path_set_to_check:
......
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