Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
stripe: Rename CustomerPlan.is_paid.
Mateusz Mandera4eacd25ad5a1
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.pyindex 2b193c64615..f3bed6883ba 100644--- a/corporate/lib/stripe.py+++ b/corporate/lib/stripe.py@@ -2981,10 +2981,10 @@ class BillingSession(ABC):self.make_end_of_cycle_updates_if_needed(plan, event_time)# The primary way to not create an invoice for a plan is to not have- # any new ledger entry. The 'plan.is_paid()' check adds an extra+ # any new ledger entry. The 'plan.is_a_paid_plan()' check adds an extra# layer of defense to avoid creating any invoices for customers not on# paid plan. It saves a DB query too.- if plan.is_paid():+ if plan.is_a_paid_plan():if plan.invoicing_status == CustomerPlan.INVOICING_STATUS_INITIAL_INVOICE_TO_BE_SENT:invoiced_through_id = -1licenses_base = None@@ -5174,7 +5174,9 @@ def invoice_plans_as_needed(event_time: Optional[datetime] = None) -> None:plan.reminder_to_review_plan_email_sent = Trueplan.save(update_fields=["reminder_to_review_plan_email_sent"])- free_plan_with_no_next_plan = not plan.is_paid() and plan.status == CustomerPlan.ACTIVE+ free_plan_with_no_next_plan = (+ not plan.is_a_paid_plan() and plan.status == CustomerPlan.ACTIVE+ )free_trial_pay_by_invoice_plan = plan.is_free_trial() and not plan.charge_automaticallylast_audit_log_update = remote_server.last_audit_log_updateif not free_plan_with_no_next_plan and (diff --git a/corporate/models.py b/corporate/models.pyindex 562b5b22803..ab4a1abeeaf 100644--- a/corporate/models.py+++ b/corporate/models.py@@ -476,7 +476,7 @@ class CustomerPlan(AbstractCustomerPlan):def is_free_trial(self) -> bool:return self.status == CustomerPlan.FREE_TRIAL- def is_paid(self) -> bool:+ def is_a_paid_plan(self) -> bool:return self.tier in self.PAID_PLAN_TIERS