From 64df8c707547c9bc5ae4c6dd359467fe7240e84f Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Tue, 19 Mar 2024 15:55:56 -0400 Subject: [PATCH] send_custom_email: is_realm_admin is a property, not a real column. --- zerver/management/commands/send_custom_email.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zerver/management/commands/send_custom_email.py b/zerver/management/commands/send_custom_email.py index ce27835a03..cf8a57f220 100644 --- a/zerver/management/commands/send_custom_email.py +++ b/zerver/management/commands/send_custom_email.py @@ -190,7 +190,9 @@ class Command(ZulipBaseCommand): add_context = add_context_from_dict if admins_only: - users = users.filter(is_realm_admin=True) + users = users.filter( + role__in=[UserProfile.ROLE_REALM_ADMINISTRATOR, UserProfile.ROLE_REALM_OWNER] + ) # Only email users who've agreed to the terms of service. if settings.TERMS_OF_SERVICE_VERSION is not None: