There is not always an error

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
Yohann D'ANELLO 2021-06-14 22:15:35 +02:00
parent f60691846b
commit 9f0a22d3d1
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
2 changed files with 3 additions and 3 deletions

View File

@ -671,9 +671,9 @@ class ClubAddMemberView(ProtectQuerysetMixin, ProtectedCreateView):
.format(form.instance.club.membership_end)) .format(form.instance.club.membership_end))
error = True error = True
if credit_amount: if credit_amount and not SpecialTransaction.validate_payment_form(form):
# Check that special information for payment are filled # Check that special information for payment are filled
error = SpecialTransaction.validate_payment_form(form) or error error = True
return not error return not error

View File

@ -348,7 +348,7 @@ class SpecialTransaction(Transaction):
first_name = form.cleaned_data["first_name"] first_name = form.cleaned_data["first_name"]
bank = form.cleaned_data["bank"] bank = form.cleaned_data["bank"]
error = True error = False
if not last_name or not first_name or (not bank and credit_type.special_type == "Chèque"): if not last_name or not first_name or (not bank and credit_type.special_type == "Chèque"):
if not last_name: if not last_name: