Commit d506a22a authored by Xiaowu Zhang's avatar Xiaowu Zhang Committed by Cédric Le Ninivin

RuleMixin: Don't compensate on frozen if quantity is 0

parent 7a22342c
......@@ -342,6 +342,9 @@ class RuleMixin(Predicate):
if decision_movement.isFrozen():
# Frozen must be compensated
if not _compare(divergence_tester_list, prevision_movement, decision_movement):
if not decision_movement_quantity:
# We don't compensate if compensated quantity is 0
continue
new_movement = decision_movement.asContext(
quantity=-decision_movement_quantity)
new_movement.setDelivery(None)
......
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