8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-23 23:43:47 +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:
Hugo LEVY-FALK 2018-07-13 13:16:51 +02:00
parent 17da4a52dc
commit ef846415b4

View file

@ -104,6 +104,8 @@ class PaymentMethodForm(forms.Form):
Tries to call `payment_method.alter_payment` if it exists.
"""
commit = kwargs.pop('commit', True)
if not hasattr(self, 'payment_method'):
return None
self.payment_method.payment = payment
if hasattr(self.payment_method, 'alter_payment'):
self.payment_method.alter_payment(payment)