diff --git a/app/but/jury_but.py b/app/but/jury_but.py index 071352c0a4..8371340e7d 100644 --- a/app/but/jury_but.py +++ b/app/but/jury_but.py @@ -386,7 +386,9 @@ class DecisionsProposeesAnnee(DecisionsProposees): def comp_formsemestres( self, formsemestre: FormSemestre ) -> tuple[FormSemestre, FormSemestre]: - "les deux formsemestres de l'année scolaire à laquelle appartient formsemestre" + """les deux formsemestres de l'année scolaire à laquelle appartient formsemestre.""" + if not formsemestre.formation.is_apc(): # garde fou + return None, None if formsemestre.semestre_id % 2 == 0: other_semestre_id = formsemestre.semestre_id - 1 else: @@ -420,7 +422,7 @@ class DecisionsProposeesAnnee(DecisionsProposees): (self.formsemestre_impair, self.res_impair), (self.formsemestre_pair, self.res_pair), ): - if formsemestre is None: + if (formsemestre is None) or (not formsemestre.formation.is_apc()): ues = [] else: formation: Formation = formsemestre.formation