diff --git a/app/views/jury_validations.py b/app/views/jury_validations.py
index 4d0bd39cc..3da7823cc 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"""