billing: Don't require data to add to legacy plan.

This commit is contained in:
Tim Abbott 2023-12-12 23:46:47 -08:00
parent af83093a65
commit 95f4b31ce7
1 changed files with 5 additions and 1 deletions

View File

@ -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,