From 2f68601e8bb4a245141a971dcc3b7c3e05ef702f Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Wed, 7 Oct 2020 10:46:33 +0200 Subject: [PATCH] Delete the soge credit if the user declares that one was opened but in the validation form the checkbox was unchecked --- 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 84162f43..7e863781 100644 --- a/apps/registration/views.py +++ b/apps/registration/views.py @@ -317,7 +317,7 @@ class FutureUserDetailView(ProtectQuerysetMixin, LoginRequiredMixin, FormMixin, user.profile.save() user.refresh_from_db() - if not soge and SogeCredit.objects.filter(user=user).exists: + if not soge and SogeCredit.objects.filter(user=user).exists(): # If the user declared that a bank account was opened but in the validation form the SoGĂ© case was # unchecked, delete the associated credit soge_credit = SogeCredit.objects.get(user=user)