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
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ class UserCreateView(CreateView):
user.profile.send_email_validation_link() user.profile.send_email_validation_link()
soge_form = DeclareSogeAccountOpenedForm(self.request.POST) 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 # If the user declares that a bank account got opened, prepare the soge credit to warn treasurers
soge_credit = SogeCredit(user=user) soge_credit = SogeCredit(user=user)
soge_credit._force_save = True soge_credit._force_save = True