Commit ff04daef authored by Julien Muchembled's avatar Julien Muchembled

Trade Model Rule: ignore input amount with price = 0

parent dc2fd3f9
...@@ -107,7 +107,7 @@ class TradeModelRuleMovementGenerator(MovementGeneratorMixin): ...@@ -107,7 +107,7 @@ class TradeModelRuleMovementGenerator(MovementGeneratorMixin):
amount_generator_type_list=composition_type_list) amount_generator_type_list=composition_type_list)
input_movement = aq_base(simulation_movement).__of__(self._applied_rule) input_movement = aq_base(simulation_movement).__of__(self._applied_rule)
for amount in amount_list: for amount in amount_list:
if amount.getResource(): if amount.getResource() and amount.getPrice():
# FIXME: Is it the right way to have source/destination and other # FIXME: Is it the right way to have source/destination and other
# non-Amount properties set on the generated movement ? # non-Amount properties set on the generated movement ?
movement = input_movement.asContext(**dict((k, v) movement = input_movement.asContext(**dict((k, v)
......
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