From 75232a18a380c177d96ea940480581e75e56caf4 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 15 Feb 2022 13:15:56 +0100 Subject: [PATCH] =?UTF-8?q?Am=C3=A9liore=20quelques=20routes=20et=20msg=20?= =?UTF-8?q?erreurs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_groups_view.py | 7 ++++++- app/views/notes.py | 2 +- app/views/pn_modules.py | 2 +- app/views/scodoc.py | 2 +- sco_version.py | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/scodoc/sco_groups_view.py b/app/scodoc/sco_groups_view.py index 603627d14..5b89ab44f 100644 --- a/app/scodoc/sco_groups_view.py +++ b/app/scodoc/sco_groups_view.py @@ -302,7 +302,12 @@ class DisplayedGroupsInfos(object): if group_ids: group_ids = [group_ids] # cas ou un seul parametre, pas de liste else: - group_ids = [int(g) for g in group_ids] + try: + group_ids = [int(g) for g in group_ids] + except ValueError as exc: + raise ScoValueError( + "identifiant de groupe invalide (mettre à jour vos bookmarks ?)" + ) from exc if not formsemestre_id and moduleimpl_id: mods = sco_moduleimpl.moduleimpl_list(moduleimpl_id=moduleimpl_id) if len(mods) != 1: diff --git a/app/views/notes.py b/app/views/notes.py index efad2808b..7be106444 100644 --- a/app/views/notes.py +++ b/app/views/notes.py @@ -397,7 +397,7 @@ def ue_table(formation_id=None, semestre_idx=1, msg=""): ) -@bp.route("/ue_infos/") +@bp.route("/ue_infos/") @scodoc @permission_required(Permission.ScoView) def ue_infos(ue_id): diff --git a/app/views/pn_modules.py b/app/views/pn_modules.py index 565bc210f..935020e62 100644 --- a/app/views/pn_modules.py +++ b/app/views/pn_modules.py @@ -68,7 +68,7 @@ from app.scodoc.sco_permissions import Permission @bp.route("/table_modules_ue_coefs/") -@bp.route("/table_modules_ue_coefs//") +@bp.route("/table_modules_ue_coefs//") @scodoc @permission_required(Permission.ScoView) def table_modules_ue_coefs(formation_id, semestre_idx=None): diff --git a/app/views/scodoc.py b/app/views/scodoc.py index e65c4e666..809d8e463 100644 --- a/app/views/scodoc.py +++ b/app/views/scodoc.py @@ -121,7 +121,7 @@ def create_dept(): ) -@bp.route("/ScoDoc/toggle_dept_vis/", methods=["GET", "POST"]) +@bp.route("/ScoDoc/toggle_dept_vis/", methods=["GET", "POST"]) @admin_required def toggle_dept_vis(dept_id): """Cache ou rend visible un dept""" diff --git a/sco_version.py b/sco_version.py index 23fba0069..1e9561b08 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.1.56" +SCOVERSION = "9.1.57" SCONAME = "ScoDoc"