1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-12-22 23:42:25 +00:00

The checkbox to tell that a Sogé account got opened is not mandatory

This commit is contained in:
Yohann D'ANELLO 2020-10-07 11:31:20 +02:00
parent 65a2e8c08c
commit 4a78328717

View File

@ -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