This commit is contained in:
Emmanuel Viennet 2023-09-07 08:59:33 +02:00
commit 9187a12882
2 changed files with 4 additions and 5 deletions

View File

@ -51,7 +51,7 @@ def evaluation_check_absences(evaluation: Evaluation):
EXC et pas justifie
Ramene 5 listes d'etudid
"""
if not evaluation.date_debut:
if not evaluation.date_debut or not evaluation.date_fin:
return [], [], [], [], [] # evaluation sans date
etudids = [
@ -68,10 +68,8 @@ def evaluation_check_absences(evaluation: Evaluation):
assiduites: Query = Assiduite.query.filter(
Assiduite.etudid.in_(etudids),
Assiduite.etat == scu.EtatAssiduite.ABSENT,
or_(
and_(Assiduite.date_debut >= deb, Assiduite.date_debut <= fin),
and_(Assiduite.date_fin >= deb, Assiduite.date_fin <= fin),
),
fin >= Assiduite.date_debut,
deb <= Assiduite.date_fin,
)
abs_etudids = set(assi.etudid for assi in assiduites)

View File

@ -933,6 +933,7 @@ def partition_editor(formsemestre_id: int, edit_partition=False):
formsemestre=formsemestre,
read_only=not formsemestre.can_change_groups(),
edit_partition=edit_partition,
scu=scu,
),
html_sco_header.sco_footer(),
]