From 4a78328717c388f15640d1457e5d3f90f37f6e50 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Wed, 7 Oct 2020 11:31:20 +0200 Subject: [PATCH] =?UTF-8?q?The=20checkbox=20to=20tell=20that=20a=20Sog?= =?UTF-8?q?=C3=A9=20account=20got=20opened=20is=20not=20mandatory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/registration/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/registration/views.py b/apps/registration/views.py index 7e863781..1ec069a4 100644 --- a/apps/registration/views.py +++ b/apps/registration/views.py @@ -74,7 +74,7 @@ class UserCreateView(CreateView): user.profile.send_email_validation_link() soge_form = DeclareSogeAccountOpenedForm(self.request.POST) - if soge_form.data["soge_account"]: + if "soge_account" in soge_form.data and soge_form.data["soge_account"]: # If the user declares that a bank account got opened, prepare the soge credit to warn treasurers soge_credit = SogeCredit(user=user) soge_credit._force_save = True