mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-26 06:32:26 +00:00
Il est vrai qu'il est bien de pouvoir créer des paiement sans méthode de paiement...
This commit is contained in:
parent
17da4a52dc
commit
ef846415b4
1 changed files with 2 additions and 0 deletions
|
@ -104,6 +104,8 @@ class PaymentMethodForm(forms.Form):
|
||||||
Tries to call `payment_method.alter_payment` if it exists.
|
Tries to call `payment_method.alter_payment` if it exists.
|
||||||
"""
|
"""
|
||||||
commit = kwargs.pop('commit', True)
|
commit = kwargs.pop('commit', True)
|
||||||
|
if not hasattr(self, 'payment_method'):
|
||||||
|
return None
|
||||||
self.payment_method.payment = payment
|
self.payment_method.payment = payment
|
||||||
if hasattr(self.payment_method, 'alter_payment'):
|
if hasattr(self.payment_method, 'alter_payment'):
|
||||||
self.payment_method.alter_payment(payment)
|
self.payment_method.alter_payment(payment)
|
||||||
|
|
Loading…
Reference in a new issue