Jury BUT: garde fou si mix classic/BUT...

This commit is contained in:
Emmanuel Viennet 2022-06-30 09:37:41 +02:00
parent e9c5914a9f
commit 7645247357

View File

@ -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