From 96d6e5d1f5d45a131135139f25f743cc54dea7ac Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 6 Sep 2023 21:34:12 +0200 Subject: [PATCH] Fix: evaluation_check_absences_html access --- app/views/notes.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/notes.py b/app/views/notes.py index a7fd0d212..f81b5e1b5 100644 --- a/app/views/notes.py +++ b/app/views/notes.py @@ -1798,7 +1798,13 @@ sco_publish( @permission_required(Permission.ScoView) def evaluation_check_absences_html(evaluation_id: int): "Check absences sur une évaluation" - evaluation: Evaluation = Evaluation.query.get_or_404(evaluation_id) + evaluation: Evaluation = ( + Evaluation.query.filter_by(id=evaluation_id) + .join(ModuleImpl) + .join(FormSemestre) + .filter_by(dept_id=g.scodoc_dept_id) + .first_or_404() + ) return sco_evaluation_check_abs.evaluation_check_absences_html(evaluation)