From b4b44e55581126dace0251a29c21095e86d1ff49 Mon Sep 17 00:00:00 2001 From: Lauryn Menard Date: Wed, 3 Jan 2024 19:24:27 +0100 Subject: [PATCH] support: Display remote realm is deactivated fields. Also updates populate_billing_realms to not locally deactivate test remote realms when generating them. --- templates/analytics/remote_realm_details.html | 9 +++++++++ zilencer/management/commands/populate_billing_realms.py | 4 +--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/templates/analytics/remote_realm_details.html b/templates/analytics/remote_realm_details.html index f719658d0e..ceb14dd04b 100644 --- a/templates/analytics/remote_realm_details.html +++ b/templates/analytics/remote_realm_details.html @@ -1,6 +1,15 @@
remote realm

{{ remote_realm.name }}

+ {% if remote_realm.realm_locally_deleted %} +

Remote realm is locally deleted 🛑

+ {% endif %} + {% if remote_realm.registration_deactivated %} +

Remote realm registration deactivated 🛑

+ {% endif %} + {% if remote_realm.realm_deactivated %} +

Remote realm is deactivated on remote server 🛑

+ {% endif %} {% if remote_realm.plan_type == SPONSORED_PLAN_TYPE %}

On 100% sponsored Zulip Community plan 🎉

{% endif %} diff --git a/zilencer/management/commands/populate_billing_realms.py b/zilencer/management/commands/populate_billing_realms.py index 2caadf3bdd..27fd31a2df 100644 --- a/zilencer/management/commands/populate_billing_realms.py +++ b/zilencer/management/commands/populate_billing_realms.py @@ -497,9 +497,7 @@ def populate_remote_realms(customer_profile: CustomerProfile) -> Dict[str, str]: if remote_server is None: raise AssertionError("Remote server not found! Please run manage.py register_server") - update_remote_realm_data_for_server( - remote_server, get_realms_info_for_push_bouncer(local_realm.id) - ) + update_remote_realm_data_for_server(remote_server, get_realms_info_for_push_bouncer()) remote_realm = RemoteRealm.objects.get(uuid=local_realm.uuid) user = UserProfile.objects.filter(realm=local_realm).first()