From 7ad409fbb15bbb29fc58a9fc3e6dfe947033a883 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 26 Dec 2022 17:40:57 -0300 Subject: [PATCH] =?UTF-8?q?Fix:=20jury=20BUT=20si=20UE=20non=20associ?= =?UTF-8?q?=C3=A9e=20=C3=A0=20comp.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/but/jury_but_view.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/but/jury_but_view.py b/app/but/jury_but_view.py index 6c1fda17..1a19a5b7 100644 --- a/app/but/jury_but_view.py +++ b/app/but/jury_but_view.py @@ -107,9 +107,17 @@ def show_etud(deca: DecisionsProposeesAnnee, read_only: bool = True) -> str: """ ) dec_rcue = deca.decisions_rcue_by_niveau.get(niveau.id) # peut être None - ues = [ue for ue in deca.ues_impair if ue.niveau_competence.id == niveau.id] + ues = [ + ue + for ue in deca.ues_impair + if ue.niveau_competence and ue.niveau_competence.id == niveau.id + ] ue_impair = ues[0] if ues else None - ues = [ue for ue in deca.ues_pair if ue.niveau_competence.id == niveau.id] + ues = [ + ue + for ue in deca.ues_pair + if ue.niveau_competence and ue.niveau_competence.id == niveau.id + ] ue_pair = ues[0] if ues else None # Les UEs à afficher, toujours en readonly # sur le formsemestre de l'année précédente du redoublant