From dba48f32eb0970d7110fc6ddb75137a1f0e5c7cd Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sun, 9 Jul 2023 21:57:50 +0200 Subject: [PATCH] add 404 --- app/scodoc/sco_groups.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scodoc/sco_groups.py b/app/scodoc/sco_groups.py index 689dab34..ab3e014d 100644 --- a/app/scodoc/sco_groups.py +++ b/app/scodoc/sco_groups.py @@ -745,7 +745,7 @@ def setGroups( except ValueError: log(f"setGroups: ignoring invalid group_id={group_id}") continue - group: GroupDescr = GroupDescr.query.get(group_id) + group: GroupDescr = GroupDescr.query.get_or_404(group_id) # Anciens membres du groupe: old_members_set = {etud.id for etud in group.etuds} # Place dans ce groupe les etudiants indiqués: