From 26536a20ed828f2b20a8d43d6fae769d8b7bee9d Mon Sep 17 00:00:00 2001 From: Prakhar Pratyush Date: Tue, 30 Jan 2024 17:31:33 +0530 Subject: [PATCH] support: Always show the option to update end_date on /support page. If a plan is already on "basic" or "business" plan and wants to switch to a fixed-price "basic" / "business" plan, then it is necessary that the current plan should have an end date configured. Earlier, we could update the end_date only if the current plan already had an end_date set. This commit makes it possible to always show the option to set or update end_date. --- corporate/lib/stripe.py | 1 - templates/corporate/support/current_plan_forms_support.html | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py index e92cc06fe8..3870450d5c 100644 --- a/corporate/lib/stripe.py +++ b/corporate/lib/stripe.py @@ -1312,7 +1312,6 @@ class BillingSession(ABC): if customer is not None: plan = get_current_plan_by_customer(customer) if plan is not None: - assert plan.end_date is not None assert plan.status == CustomerPlan.ACTIVE old_end_date = plan.end_date plan.end_date = new_end_date diff --git a/templates/corporate/support/current_plan_forms_support.html b/templates/corporate/support/current_plan_forms_support.html index 071c3f8b27..29919498f5 100644 --- a/templates/corporate/support/current_plan_forms_support.html +++ b/templates/corporate/support/current_plan_forms_support.html @@ -9,12 +9,13 @@ -{% if current_plan.end_date and current_plan.status == current_plan.ACTIVE %} +{% if current_plan.status == current_plan.ACTIVE %}
Plan end date
{{ csrf_input }} - +
{% endif %}