From ef846415b40e3a2f557dc02ee40d024771efbf98 Mon Sep 17 00:00:00 2001 From: Hugo LEVY-FALK Date: Fri, 13 Jul 2018 13:16:51 +0200 Subject: [PATCH] =?UTF-8?q?Il=20est=20vrai=20qu'il=20est=20bien=20de=20pou?= =?UTF-8?q?voir=20cr=C3=A9er=20des=20paiement=20sans=20m=C3=A9thode=20de?= =?UTF-8?q?=20paiement...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cotisations/payment_methods/forms.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cotisations/payment_methods/forms.py b/cotisations/payment_methods/forms.py index be8df2d1..c0c16cd6 100644 --- a/cotisations/payment_methods/forms.py +++ b/cotisations/payment_methods/forms.py @@ -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)