From 95f4b31ce73a8c3c015407b020cbafef0b050d25 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 12 Dec 2023 23:46:47 -0800 Subject: [PATCH] billing: Don't require data to add to legacy plan. --- corporate/lib/stripe.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py index ae3c9ae133..bd3d3557f6 100644 --- a/corporate/lib/stripe.py +++ b/corporate/lib/stripe.py @@ -2620,7 +2620,11 @@ class BillingSession(ABC): **legacy_plan_params, ) - billed_licenses = self.get_billable_licenses_for_customer(customer, legacy_plan.tier) + try: + billed_licenses = self.get_billable_licenses_for_customer(customer, legacy_plan.tier) + except MissingDataError: + billed_licenses = 0 + # Create a ledger entry for the legacy plan for tracking purposes. ledger_entry = LicenseLedger.objects.create( plan=legacy_plan,