From 22245002096bb0f7f3c0877ca3fc123a11dd98d6 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 12 Jul 2024 17:23:06 +0200 Subject: [PATCH] =?UTF-8?q?formsemestre=5Fvalidation=5Fbut:=20message=20er?= =?UTF-8?q?reur=20si=20=C3=A9tudiant=20non=20inscrit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/jury_validations.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/jury_validations.py b/app/views/jury_validations.py index 4d0bd39c..3da7823c 100644 --- a/app/views/jury_validations.py +++ b/app/views/jury_validations.py @@ -265,8 +265,10 @@ def formsemestre_validation_but( """
""", ] - - if formsemestre.etuds_inscriptions[etudid].etat != scu.INSCRIT: + inscription = formsemestre.etuds_inscriptions.get(etudid) + if not inscription: + raise ScoValueError("étudiant non inscrit au semestre") + if inscription.etat != scu.INSCRIT: return ( "\n".join(H) + f"""