From a856a3ef6f8abe5629d11db0ceacd9c977c3eaa1 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Fri, 25 Jun 2021 11:09:49 +0200 Subject: [PATCH] Stripe: Fix a rare crash with malformed settings --- src/pretix/plugins/stripe/payment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pretix/plugins/stripe/payment.py b/src/pretix/plugins/stripe/payment.py index 498a51367f..a0f7275d91 100644 --- a/src/pretix/plugins/stripe/payment.py +++ b/src/pretix/plugins/stripe/payment.py @@ -315,7 +315,7 @@ class StripeMethod(BasePaymentProvider): if self.settings.connect_client_id and not self.settings.secret_key: is_testmode = True else: - is_testmode = '_test_' in self.settings.secret_key + is_testmode = self.settings.secret_key and '_test_' in self.settings.secret_key if is_testmode: return mark_safe( _('The Stripe plugin is operating in test mode. You can use one of many test '