Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

support: Always show the option to update end_date on /support page.

Prakhar Pratyush26536a20ed82
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py
index e92cc06fe8b..3870450d5c3 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 071c3f8b271..29919498f5f 100644
--- a/templates/corporate/support/current_plan_forms_support.html
+++ b/templates/corporate/support/current_plan_forms_support.html
@@ -9,12 +9,13 @@
<button type="submit" class="support-submit-button">Update</button>
</form>
-{% if current_plan.end_date and current_plan.status == current_plan.ACTIVE %}
+{% if current_plan.status == current_plan.ACTIVE %}
<form method="POST" class="remote-form">
<b>Plan end date</b><br />
{{ csrf_input }}
<input type="hidden" name="{{ remote_type }}" value="{{ remote_id }}" />
- <input type="date" name="plan_end_date" value="{{ current_plan.end_date.strftime('%Y-%m-%d') }}" required />
+ <input type="date" name="plan_end_date" {% if current_plan.end_date %}
+ value="{{ current_plan.end_date.strftime('%Y-%m-%d') }}" {% endif %} required />
<button type="submit" class="support-submit-button">Update</button>
</form>
{% endif %}