From 7b5eefcc0a36b1cd1e1da943cc9f0956440a3bf5 Mon Sep 17 00:00:00 2001 From: nicomarg Date: Thu, 29 Aug 2024 19:23:26 +0200 Subject: [PATCH] Update 2 files - /apps/registration/views.py - /apps/permission/fixtures/initial.json --- apps/permission/fixtures/initial.json | 13 +++++++++++++ apps/registration/views.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/apps/permission/fixtures/initial.json b/apps/permission/fixtures/initial.json index 9e4ba924..63626d27 100644 --- a/apps/permission/fixtures/initial.json +++ b/apps/permission/fixtures/initial.json @@ -3851,6 +3851,19 @@ "for_club": null, "name": "Membre de club", "permissions": [ + 1, + 2, + 3, + 4, + 5, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, 22 ] } diff --git a/apps/registration/views.py b/apps/registration/views.py index f0314285..00c718be 100644 --- a/apps/registration/views.py +++ b/apps/registration/views.py @@ -300,7 +300,7 @@ class FutureUserDetailView(ProtectQuerysetMixin, LoginRequiredMixin, FormMixin, # join_bde = True # join_kfet = True - if not join_bde: + if not join_bde or any(b for _, b in join_clubs): # This software belongs to the BDE. form.add_error('join_bde', _("You must join the BDE.")) return super().form_invalid(form)