Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
billing: Set the legacy plan type when migrating.
Tim Abbottd040664952b1
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.pyindex 14acdfadcbe..1ea77386626 100644--- a/corporate/lib/stripe.py+++ b/corporate/lib/stripe.py@@ -2653,6 +2653,8 @@ class BillingSession(ABC):extra_data=legacy_plan_params,)+ self.do_change_plan_type(tier=CustomerPlan.TIER_SELF_HOSTED_LEGACY, is_sponsored=False)+def get_last_ledger_for_automanaged_plan_if_exists(self,) -> Optional[LicenseLedger]: # nocoverage@@ -3177,6 +3179,8 @@ class RemoteRealmBillingSession(BillingSession):plan_type = RemoteRealm.PLAN_TYPE_COMMUNITYelif tier == CustomerPlan.TIER_SELF_HOSTED_BUSINESS:plan_type = RemoteRealm.PLAN_TYPE_BUSINESS+ elif tier == CustomerPlan.TIER_SELF_HOSTED_LEGACY:+ plan_type = RemoteRealm.PLAN_TYPE_SELF_MANAGED_LEGACYelse:raise AssertionError("Unexpected tier")@@ -3567,6 +3571,8 @@ class RemoteServerBillingSession(BillingSession):plan_type = RemoteZulipServer.PLAN_TYPE_COMMUNITYelif tier == CustomerPlan.TIER_SELF_HOSTED_BUSINESS:plan_type = RemoteZulipServer.PLAN_TYPE_BUSINESS+ elif tier == CustomerPlan.TIER_SELF_HOSTED_LEGACY:+ plan_type = RemoteZulipServer.PLAN_TYPE_SELF_MANAGED_LEGACYelse:raise AssertionError("Unexpected tier")