mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
We do not use any related fields for the UserProfile objects fetched by get_active_users, so we can simply remove the select_related call. The user object from get_active_users was used to get realm but since get_active_users called from a realm object we can directly use that realm object. This change also leads to some changes in the cache code where we now pass the realm to the function instead of selecting it from UserProfile object.