Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

stripe: Fix error on visiting `/customer_portal` without parameters.

Aman Agrawal0b063e73feb2
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py
index b38fe313f99..1662fe56852 100644
--- a/corporate/lib/stripe.py
+++ b/corporate/lib/stripe.py
@@ -823,10 +823,9 @@ class BillingSession(ABC):
assert customer.stripe_customer_id is not None
- if return_to_billing_page:
+ if return_to_billing_page or tier is None:
return_url = f"{self.billing_session_url}/billing/"
else:
- assert tier is not None
base_return_url = f"{self.billing_session_url}/upgrade/"
params = {
"manual_license_management": str(manual_license_management).lower(),