From 7645247357033ce2d419340028f93487eb311366 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 30 Jun 2022 09:37:41 +0200 Subject: [PATCH] Jury BUT: garde fou si mix classic/BUT... --- app/but/jury_but.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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