Commit 20e1026a by Yvon Kerdoncuff

fix variable wrongly named after v12 port causing change rattrapages bug

parent e25fc1f2
Pipeline #3896 canceled with stage
...@@ -410,7 +410,7 @@ def update_members_makeups_core(members_data, res): ...@@ -410,7 +410,7 @@ def update_members_makeups_core(members_data, res):
if member_data["member_shift_type"] == "standard": if member_data["member_shift_type"] == "standard":
# Set points to minus the number of makeups to do + the makeups to come (limited to -2) # Set points to minus the number of makeups to do + the makeups to come (limited to -2)
cs = CagetteShift() cs = CagetteShift()
[shiftData, is_ftop] = cs.get_shift_partner(int(member_data["member_id"])) [shift_data, is_ftop] = 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']) 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
......
...@@ -358,14 +358,14 @@ function update_members_makeups(member_ids, action, description) { ...@@ -358,14 +358,14 @@ function update_members_makeups(member_ids, action, description) {
closeModal(); closeModal();
}, },
error: function(data) { error: function(data) {
err = {msg: "erreur serveur pour décrémenter les rattrapages", ctx: 'decrement_makeups'}; err = {msg: "erreur serveur pour incrémenter ou décrémenter les rattrapages", ctx: 'update_members_makeups'};
if (typeof data.responseJSON != 'undefined' && typeof data.responseJSON.error != 'undefined') { if (typeof data.responseJSON != 'undefined' && typeof data.responseJSON.error != 'undefined') {
err.msg += ' : ' + data.responseJSON.error; err.msg += ' : ' + data.responseJSON.error;
} }
report_JS_error(err, 'members_admin-manage_makeups'); report_JS_error(err, 'members_admin-manage_makeups');
closeModal(); closeModal();
alert('Erreur serveur pour décrémenter les rattrapages. Veuillez contacer le service informatique.'); alert('Erreur serveur pour incrémenter ou décrémenter les rattrapages. Veuillez contacter le service informatique.');
} }
}); });
} }
...@@ -411,7 +411,7 @@ function extend_member_delay(member) { ...@@ -411,7 +411,7 @@ function extend_member_delay(member) {
report_JS_error(err, 'members_admin-manage_makeups'); report_JS_error(err, 'members_admin-manage_makeups');
closeModal(); closeModal();
alert('Erreur serveur pour créer un délai. Veuillez contacer le service informatique.'); alert('Erreur serveur pour créer un délai. Veuillez contacter le service informatique.');
} }
}); });
} }
......
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