From 428a34e6ba2def904a20126be97f533622f5eeed Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 6 Jul 2023 09:57:51 +0200 Subject: [PATCH] =?UTF-8?q?Am=C3=A9liore=20traitement=20erreur=20si=20id?= =?UTF-8?q?=20invalide=20envoy=C3=A9=20=C3=A0=20formsemestre=5Fvalidation?= =?UTF-8?q?=5Fbut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/notes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/notes.py b/app/views/notes.py index 4bc79ebae..4ee25a900 100644 --- a/app/views/notes.py +++ b/app/views/notes.py @@ -2339,14 +2339,14 @@ def formsemestre_validation_but( formsemestre: FormSemestre = FormSemestre.query.filter_by( id=formsemestre_id, dept_id=g.scodoc_dept_id ).first_or_404() - etud = Identite.get_etud(etudid) - nb_etuds = formsemestre.etuds.count() # la route ne donne pas le type d'etudid pour pouvoir construire des URLs # provisoires avec NEXT et PREV try: etudid = int(etudid) - except ValueError: - abort(404, "invalid etudid") + except ValueError as exc: + raise ScoValueError("adresse invalide") from exc + etud = Identite.get_etud(etudid) + nb_etuds = formsemestre.etuds.count() read_only = not formsemestre.can_edit_jury() # --- Navigation