From c2a41c268f1a0ac3bf009e68f4af255097a746c7 Mon Sep 17 00:00:00 2001 From: Rishi Gupta Date: Tue, 19 Dec 2017 14:19:52 -0800 Subject: [PATCH] models: Update Realm.get_admin_users to not use select_related(). None of the uses of this function in the codebase follow any of the foreign keys of UserProfile. --- zerver/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerver/models.py b/zerver/models.py index b4888f8d09..9af5e9aeb5 100644 --- a/zerver/models.py +++ b/zerver/models.py @@ -234,7 +234,7 @@ class Realm(models.Model): def get_admin_users(self) -> Sequence['UserProfile']: # TODO: Change return type to QuerySet[UserProfile] return UserProfile.objects.filter(realm=self, is_realm_admin=True, - is_active=True).select_related() + is_active=True) def get_active_users(self) -> Sequence['UserProfile']: # TODO: Change return type to QuerySet[UserProfile]