mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
groups: Use realm_for_sharding for limiting NamedUserGroup queries.
For get and filter queries of NamedUserGroup, realm_for_sharding field is used instead of realm field, as directly using realm_for_sharding field on NamedUserGroup makes the query faster than using realm present on the base UserGroup table.
This commit is contained in:
@@ -64,7 +64,7 @@ with test_server_running(
|
||||
|
||||
# Iago needs permission to manage all user groups.
|
||||
admins_group = NamedUserGroup.objects.get(
|
||||
name=SystemGroups.ADMINISTRATORS, realm=realm, is_system_group=True
|
||||
name=SystemGroups.ADMINISTRATORS, realm_for_sharding=realm, is_system_group=True
|
||||
)
|
||||
do_change_realm_permission_group_setting(
|
||||
realm, "can_manage_all_groups", admins_group, acting_user=None
|
||||
|
Reference in New Issue
Block a user