From 37dcdca65b523a2e440ea543fba952b05e36c4d1 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 12 Aug 2024 12:40:01 +0200 Subject: [PATCH] Fix regression: inscription --- app/scodoc/sco_formsemestre_inscriptions.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/scodoc/sco_formsemestre_inscriptions.py b/app/scodoc/sco_formsemestre_inscriptions.py index df292f717..9c234ff5c 100644 --- a/app/scodoc/sco_formsemestre_inscriptions.py +++ b/app/scodoc/sco_formsemestre_inscriptions.py @@ -288,7 +288,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}