Fix: API route etudiant-formsemestre-bulletin : acces par dept

This commit is contained in:
Emmanuel Viennet 2022-08-30 16:48:10 +02:00
parent d865c42fe5
commit 7f707d5a4c
1 changed files with 1 additions and 1 deletions

View File

@ -335,7 +335,7 @@ def etudiant_bulletin_semestre(
"""
formsemestre = FormSemestre.query.filter_by(id=formsemestre_id).first_or_404()
dept = Departement.query.filter_by(id=formsemestre.dept_id).first_or_404()
if g.scodoc_dept and dept != g.scodoc_dept:
if g.scodoc_dept and dept.acronym != g.scodoc_dept:
return json_error(404, "formsemestre non trouve")
if etudid is not None:
query = Identite.query.filter_by(id=etudid)