diff --git a/app/scodoc/sco_page_etud.py b/app/scodoc/sco_page_etud.py index 5fe3561c9..6c8b08b2c 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'}