mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
groups: Do not prefetch can_access_all_users_group setting.
This commit updates code to not prefetch can_access_all_users_group and can_access_all_users_group__named_user_group fields using select_related. We can just use get_realm_system_groups_name_dict function to check if setting is set to "Everyone" group when needed and can avoid unnecessarily fetching groups for every user query.
This commit is contained in:
@@ -1028,8 +1028,8 @@ class LoginTest(ZulipTestCase):
|
||||
# to sending messages, such as getting the welcome bot, looking up
|
||||
# the alert words for a realm, etc.
|
||||
with (
|
||||
self.assert_database_query_count(94),
|
||||
self.assert_memcached_count(15),
|
||||
self.assert_database_query_count(93),
|
||||
self.assert_memcached_count(18),
|
||||
self.captureOnCommitCallbacks(execute=True),
|
||||
):
|
||||
self.register(self.nonreg_email("test"), "test")
|
||||
|
Reference in New Issue
Block a user