From dfcb630db7ae6e8879a179a2a4c7250ff7c27bd0 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 3 Jan 2023 09:36:20 -0300 Subject: [PATCH] =?UTF-8?q?Fix=20erreur=20si=20changement=20jours=20travai?= =?UTF-8?q?ll=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/absences.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/absences.py b/app/views/absences.py index 0f782ad0..c65a2d49 100644 --- a/app/views/absences.py +++ b/app/views/absences.py @@ -715,7 +715,10 @@ def _gen_form_saisie_groupe( jn = sco_abs.day_names() for d in odates: idx_jour = d.weekday() - noms_jours.append(jn[idx_jour]) + if 0 <= idx_jour < len(jn): + noms_jours.append(jn[idx_jour]) + else: + noms_jours.append("???") # jour non travaillé for jour in noms_jours: H.append( f"""