Fix: do_formsemestre_inscription_with_modules args

This commit is contained in:
Emmanuel Viennet 2022-12-02 16:54:43 +01:00
parent 0d8ca2e42c
commit abfa6c586d

View File

@ -266,7 +266,7 @@ def do_formsemestre_desinscription(etudid, formsemestre_id):
def do_formsemestre_inscription_with_modules(
formsemestre_id,
etudid,
group_ids=[],
group_ids: list = None,
etat=scu.INSCRIT,
etape=None,
method="inscription_with_modules",
@ -274,6 +274,9 @@ def do_formsemestre_inscription_with_modules(
"""Inscrit cet etudiant à ce semestre et TOUS ses modules STANDARDS
(donc sauf le sport)
"""
group_ids = group_ids or []
if isinstance(group_ids, int):
group_ids = [group_ids]
formsemestre = FormSemestre.query.get_or_404(formsemestre_id)
# inscription au semestre
args = {"formsemestre_id": formsemestre_id, "etudid": etudid}