From 7dada615e8a9f9d36950846e535c9aac242246b1 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 12 Jul 2024 18:40:33 +0200 Subject: [PATCH] Fix fiche etud et bulletin BUT en cas de pb de config formation APC. Closes #965 --- app/scodoc/sco_page_etud.py | 7 +++++-- app/static/css/scodoc.css | 5 +++++ app/static/js/releve-but.js | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/scodoc/sco_page_etud.py b/app/scodoc/sco_page_etud.py index 5fe3561c..6c8b08b2 100644 --- a/app/scodoc/sco_page_etud.py +++ b/app/scodoc/sco_page_etud.py @@ -462,7 +462,10 @@ def fiche_etud(etudid=None): # Liens vers compétences BUT if last_formsemestre and last_formsemestre.formation.is_apc(): - but_cursus = cursus_but.EtudCursusBUT(etud, last_formsemestre.formation) + try: + but_cursus = cursus_but.EtudCursusBUT(etud, last_formsemestre.formation) + except ScoValueError: + but_cursus = None refcomp = last_formsemestre.formation.referentiel_competence if refcomp: ue_validation_by_niveau = validations_view.get_ue_validation_by_niveau( @@ -494,7 +497,7 @@ def fiche_etud(etudid=None): cursus=but_cursus, scu=scu, validation_dut120_html=validation_dut120_html, - )} + ) if but_cursus else 'problème configuration formation BUT'}