Commit bf5f0a70 by Yvon

take into account makeups to come in computation of target point in update_members_makeups_core

parent d6828972
Pipeline #3051 failed with stage
in 1 minute 5 seconds
...@@ -399,8 +399,10 @@ def update_members_makeups_core(members_data, res): ...@@ -399,8 +399,10 @@ def update_members_makeups_core(members_data, res):
# Update member standard points, for standard members only # Update member standard points, for standard members only
if member_data["member_shift_type"] == "standard": if member_data["member_shift_type"] == "standard":
# Set points to minus the number of makeups to do (limited to -2) # Set points to minus the number of makeups to do + the makeups to come (limited to -2)
target_points = - int(member_data["target_makeups_nb"]) cs = CagetteShift()
shift_data = cs.get_shift_partner(int(member_data["member_id"]))
target_points = - int(member_data["target_makeups_nb"]) - sum(1 for value in shift_data if value['is_makeup'])
if (target_points < -2): if (target_points < -2):
target_points = -2 target_points = -2
......
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