From abfa6c586dca041b064dfbb8d934903aec4423bc Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 2 Dec 2022 16:54:43 +0100 Subject: [PATCH] Fix: do_formsemestre_inscription_with_modules args --- app/scodoc/sco_formsemestre_inscriptions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/scodoc/sco_formsemestre_inscriptions.py b/app/scodoc/sco_formsemestre_inscriptions.py index 2c4fd681a..f14bd06b7 100644 --- a/app/scodoc/sco_formsemestre_inscriptions.py +++ b/app/scodoc/sco_formsemestre_inscriptions.py @@ -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}