Fix ValueError on change of payment method

Fixes Sentry issue PRETIXEU-KX
This commit is contained in:
Raphael Michel
2018-08-31 11:15:59 +02:00
parent f790148ad3
commit d789beddd0
2 changed files with 43 additions and 2 deletions

View File

@@ -428,8 +428,7 @@ class OrderPayChangeMethod(EventViewMixin, OrderDetailMixin, TemplateView):
else:
if fee.pk:
fee.delete()
else:
fee = None
fee = None
if self.open_payment and self.open_payment.state in (OrderPayment.PAYMENT_STATE_PENDING,
OrderPayment.PAYMENT_STATE_CREATED):