diff --git a/app/scodoc/sco_formsemestre_inscriptions.py b/app/scodoc/sco_formsemestre_inscriptions.py index e7f0ef9c8..746fee7db 100644 --- a/app/scodoc/sco_formsemestre_inscriptions.py +++ b/app/scodoc/sco_formsemestre_inscriptions.py @@ -253,7 +253,11 @@ def do_formsemestre_inscription_with_modules( if isinstance(group_ids, int): group_ids = [group_ids] # Check that all groups exist before creating the inscription - groups = [GroupDescr.query.get_or_404(group_id) for group_id in group_ids] + groups = [ + GroupDescr.query.get_or_404(group_id) + for group_id in group_ids + if group_id != "" + ] formsemestre = FormSemestre.get_formsemestre(formsemestre_id, dept_id=dept_id) # Inscription au semestre args = {"formsemestre_id": formsemestre_id, "etudid": etudid}