invoice_plan: Don't test an Optional value using implicit truthiness.

This commit is contained in:
Prakhar Pratyush 2024-03-07 17:07:45 +05:30 committed by Tim Abbott
parent 597704fa5f
commit 01516ef512

View File

@ -2793,7 +2793,7 @@ class BillingSession(ABC):
}
description = f"{plan.name} - renewal"
elif licenses_base is not None and ledger_entry.licenses != licenses_base:
assert plan.price_per_license
assert plan.price_per_license is not None
last_ledger_entry_renewal = (
LicenseLedger.objects.filter(
plan=plan, is_renewal=True, event_time__lte=ledger_entry.event_time