From fdcf6388f54654e3e4eb4326ddd2fc8f43cc954b Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 27 Feb 2024 12:59:48 +0100 Subject: [PATCH] Jury BUT: erreur si UE d'un RCUE sans niveau de comp. --- app/but/cursus_but.py | 11 +++++++---- sco_version.py | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/but/cursus_but.py b/app/but/cursus_but.py index e2c45c9f..d55d1e88 100644 --- a/app/but/cursus_but.py +++ b/app/but/cursus_but.py @@ -114,10 +114,13 @@ class EtudCursusBUT: validation_rcue: ApcValidationRCUE for validation_rcue in ApcValidationRCUE.query.filter_by(etud=etud): niveau = validation_rcue.niveau() - if ( - niveau is None - or not niveau.competence.id in self.validation_par_competence_et_annee - ): + if niveau is None: + raise ScoValueError( + """UE d'un RCUE non associée à un niveau de compétence. + Vérifiez la formation et les associations de ses UEs. + """ + ) + if not niveau.competence.id in self.validation_par_competence_et_annee: self.validation_par_competence_et_annee[niveau.competence.id] = {} previous_validation = self.validation_par_competence_et_annee.get( niveau.competence.id diff --git a/sco_version.py b/sco_version.py index 8c642266..8759ee11 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.6.946" +SCOVERSION = "9.6.947" SCONAME = "ScoDoc"