Commit cc641c14 by François C.

Fix makeups_to_do bug

parent 27ac19fc
......@@ -172,7 +172,7 @@ class ShiftCounterEvent(models.Model):
if target_status is not None:
vals_for_update = {'working_state': target_status, 'cooperative_state': target_status}
if vals['point_qty'] < 0:
vals_for_update['makeups_to_do'] = partner.makeups_to_do + abs(vals['point_qty'])
vals_for_update['makeups_to_do'] = partner.makeups_to_do + 1
partner.update(vals_for_update)
if target_status == 'unsubscribed':
self.unsubscribe_partner(partner, unsubscribe_limit, points_after_computation)
......
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