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.

activity: Show special plan type string for demo organizations.

Lauryn Menardf7ffb1b5c73b
diff --git a/corporate/views/installation_activity.py b/corporate/views/installation_activity.py
index 0b4e20a4715..20b013b27f0 100644
--- a/corporate/views/installation_activity.py
+++ b/corporate/views/installation_activity.py
@@ -99,6 +99,7 @@ def realm_summary_table(export: bool) -> str:
"""
SELECT
realm.string_id,
+ realm.demo_organization_scheduled_deletion_date,
realm.date_created,
realm.plan_type,
realm.org_type,
@@ -238,6 +239,9 @@ def realm_summary_table(export: bool) -> str:
for row in rows:
realm_string_id = row.pop("string_id")
+ demo_organization_scheduled_deletion_date = row.pop(
+ "demo_organization_scheduled_deletion_date"
+ )
# Format fields and add links.
row["date_created_day"] = format_datetime_as_date(row["date_created"])
@@ -269,7 +273,10 @@ def realm_summary_table(export: bool) -> str:
# Estimate annual recurring revenue.
if settings.BILLING_ENABLED:
- row["plan_type_string"] = get_plan_type_string(row["plan_type"])
+ if demo_organization_scheduled_deletion_date is None:
+ row["plan_type_string"] = get_plan_type_string(row["plan_type"])
+ else:
+ row["plan_type_string"] = "Demo"
if realm_string_id in estimated_arrs:
row["arr"] = f"${cents_to_dollar_string(estimated_arrs[realm_string_id])}"