From f60691846bef464f4e250bb145ac28be59c62c7c Mon Sep 17 00:00:00 2001
From: Yohann D'ANELLO <ynerant@crans.org>
Date: Mon, 14 Jun 2021 21:54:32 +0200
Subject: [PATCH] Don't block valid payments

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
---
 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 312aa526..84e9858d 100644
--- a/apps/registration/views.py
+++ b/apps/registration/views.py
@@ -304,7 +304,7 @@ class FutureUserDetailView(ProtectQuerysetMixin, LoginRequiredMixin, FormMixin,
             return self.form_invalid(form)
 
         # Check that payment information are filled, like last name and first name
-        if credit_type is not None and credit_amount > 0 and SpecialTransaction.validate_payment_form(form):
+        if credit_type is not None and credit_amount > 0 and not SpecialTransaction.validate_payment_form(form):
             return self.form_invalid(form)
 
         # Save the user and finally validate the registration
-- 
GitLab