diff --git a/app/static/js/releve-but.js b/app/static/js/releve-but.js
index b0ad34439..dfa0fa92b 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 520609efe..9e4d5b87f 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)