From 92f6886ac193719bcb34c89db59fcfb5e0f01fd8 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 4 Sep 2023 06:39:35 +0200 Subject: [PATCH] Fix: bulletin_but_court (decision_ue, et cas sans ues) --- app/but/bulletin_but_court.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/but/bulletin_but_court.py b/app/but/bulletin_but_court.py index 3997d091a..922e26de5 100644 --- a/app/but/bulletin_but_court.py +++ b/app/but/bulletin_but_court.py @@ -72,9 +72,11 @@ def bulletin_but(formsemestre_id: int, etudid: int = None, fmt="html"): bul: dict = bulletins_sem.bulletin_etud(etud) decision_ues = ( {x["acronyme"]: x for x in bul["semestre"]["decision_ue"]} - if "semestre" in bul + if "semestre" in bul and "decision_ue" in bul["semestre"] else {} ) + if not "ues" in bul: + raise ScoValueError("Aucune UE à afficher") cursus = cursus_but.EtudCursusBUT(etud, formsemestre.formation) refcomp = formsemestre.formation.referentiel_competence if refcomp is None: