mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-25 11:37:22 +02:00
Tests et permissions
This commit is contained in:
@ -1084,12 +1084,12 @@ class WEIValidateRegistrationView(ProtectQuerysetMixin, ProtectedCreateView):
|
||||
# Vérifier que l'utilisateur a assez d'argent pour tout payer
|
||||
if not registration.soge_credit and user.note.balance + credit_amount < total_needed:
|
||||
form.add_error('credit_type',
|
||||
_("This user doesn't have enough money to join this club and pay the deposit. "
|
||||
"Current balance: %(balance)d€, credit: %(credit)d€, needed: %(needed)d€") % {
|
||||
'balance': user.note.balance,
|
||||
'credit': credit_amount,
|
||||
'needed': total_needed,
|
||||
})
|
||||
_("This user doesn't have enough money to join this club and pay the deposit. "
|
||||
"Current balance: %(balance)d€, credit: %(credit)d€, needed: %(needed)d€") % {
|
||||
'balance': user.note.balance,
|
||||
'credit': credit_amount,
|
||||
'needed': total_needed}
|
||||
)
|
||||
return super().form_invalid(form)
|
||||
|
||||
if credit_amount:
|
||||
|
Reference in New Issue
Block a user