diff --git a/wiki_groups/views.py b/wiki_groups/views.py index e2055f1..b43e92f 100644 --- a/wiki_groups/views.py +++ b/wiki_groups/views.py @@ -174,7 +174,13 @@ class AddGroupView(WikiGroupMixin, BaseFormView): group = self.object if group.group_in_cycle(list(group.includes_groups.all()) + [subgroup]): - form.add_error("group", "Ajout impossible sous peine de créer un cycle") + form.add_error( + "group", + ( + "Ajout impossible sous peine de créer un cycle " + f"({group} est inclus dans {subgroup})" + ), + ) return self.form_invalid(form) group.includes_groups.add(subgroup)