From 49d176c6031ad344e984669951b9cee1fc0e4988 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sun, 13 Nov 2022 18:36:07 +0100 Subject: [PATCH] 9.4.3 --- app/static/js/releve-but.js | 6 ++---- app/views/absences.py | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/static/js/releve-but.js b/app/static/js/releve-but.js index b0ad3443..dfa0fa92 100644 --- a/app/static/js/releve-but.js +++ b/app/static/js/releve-but.js @@ -220,10 +220,8 @@ class releveBUT extends HTMLElement {
Min. promo. :
${data.semestre.notes.min}
${(() => { - if (data.semestre.rang.groupes == null) { - return ""; - } - if (Object.keys(data.semestre.rang.groupes).length == 0) { + if ((!data.semestre.rang.groupes) || + (Object.keys(data.semestre.rang.groupes).length == 0)) { return ""; } let output = ""; diff --git a/app/views/absences.py b/app/views/absences.py index 520609ef..9e4d5b87 100644 --- a/app/views/absences.py +++ b/app/views/absences.py @@ -1380,8 +1380,10 @@ def _ProcessBilletAbsence( @scodoc @permission_required(Permission.ScoAbsChange) @scodoc7func -def process_billet_absence_form(billet_id): +def process_billet_absence_form(billet_id: int): """Formulaire traitement d'un billet""" + if not isinstance(billet_id, int): + raise abort(404, "billet_id invalide") billet: BilletAbsence = ( BilletAbsence.query.filter_by(id=billet_id) .join(Identite)