API departement: noms fonctions pour doc

This commit is contained in:
Emmanuel Viennet 2024-07-17 15:45:35 +02:00
parent 8a59121b80
commit bf2e2bb600

View File

@ -214,7 +214,7 @@ def departement_etudiants_by_id(dept_id: int):
@scodoc @scodoc
@permission_required(Permission.ScoView) @permission_required(Permission.ScoView)
@as_json @as_json
def dept_formsemestres_ids(acronym: str): def departement_formsemestres_ids(acronym: str):
"""liste des ids formsemestre du département""" """liste des ids formsemestre du département"""
dept = Departement.query.filter_by(acronym=acronym).first_or_404() dept = Departement.query.filter_by(acronym=acronym).first_or_404()
return [formsemestre.id for formsemestre in dept.formsemestres] return [formsemestre.id for formsemestre in dept.formsemestres]
@ -225,7 +225,7 @@ def dept_formsemestres_ids(acronym: str):
@scodoc @scodoc
@permission_required(Permission.ScoView) @permission_required(Permission.ScoView)
@as_json @as_json
def dept_formsemestres_ids_by_id(dept_id: int): def departement_formsemestres_ids_by_id(dept_id: int):
"""liste des ids formsemestre du département""" """liste des ids formsemestre du département"""
dept = Departement.query.get_or_404(dept_id) dept = Departement.query.get_or_404(dept_id)
return [formsemestre.id for formsemestre in dept.formsemestres] return [formsemestre.id for formsemestre in dept.formsemestres]