send_custom_email: is_realm_admin is a property, not a real column.

This commit is contained in:
Alex Vandiver 2024-03-19 15:55:56 -04:00 committed by Tim Abbott
parent 85d5669a4a
commit 64df8c7075
1 changed files with 3 additions and 1 deletions

View File

@ -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: