Fix erreur si changement jours travaillés

This commit is contained in:
Emmanuel Viennet 2023-01-03 09:36:20 -03:00 committed by iziram
parent fffb07d612
commit 277e87add9

View File

@ -715,7 +715,10 @@ def _gen_form_saisie_groupe(
jn = sco_abs.day_names() jn = sco_abs.day_names()
for d in odates: for d in odates:
idx_jour = d.weekday() idx_jour = d.weekday()
if 0 <= idx_jour < len(jn):
noms_jours.append(jn[idx_jour]) noms_jours.append(jn[idx_jour])
else:
noms_jours.append("???") # jour non travaillé
for jour in noms_jours: for jour in noms_jours:
H.append( H.append(
f"""<th colspan="2" width="100px" style="padding-left: 5px; padding-right: 5px;"> f"""<th colspan="2" width="100px" style="padding-left: 5px; padding-right: 5px;">