Look up trade_phase on the simulation movement itself

Previously Simulaiton Movements did not carry trade_phase, but they do now, and looking up trade_phase on the Trade Model Path forces one TMP per trade_phase
parent bbd60db2
......@@ -178,16 +178,14 @@ class ExplanationCache:
def getParentSimulationMovementValueList(obj, movement_list, trade_phase):
parent = obj.getParentValue()
while parent.getPortalType() == "Simulation Movement":
if parent.getCausalityValue(portal_type="Trade Model Path"
).isMemberOf(trade_phase, strict_membership=1):
if parent.isMemberOf(trade_phase, strict_membership=1):
movement_list.append(parent)
parent = parent.getParentValue().getParentValue()
def getChildSimulationMovementValueList(obj, movement_list, trade_phase):
for child in obj.objectValues():
if (child.getPortalType() == "Simulation Movement" and
child.getCausalityValue(portal_type="Trade Model Path"
).isMemberOf(trade_phase, strict_membership=1)):
child.isMemberOf(trade_phase, strict_membership=1)):
movement_list.append(child)
getChildSimulationMovementValueList(child, movement_list, trade_phase)
......
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