From 382dd64ce95c37bf2b1cd0b1c6b95e4e34161323 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 2 Oct 2013 12:02:36 -0400 Subject: [PATCH] gather_subscriptions: Tighten the query for Subscription objects. (imported from commit a7caed32e52f68c7d6e33e15a7954df4fe90d797) --- zerver/lib/actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index 428c69b19d..435e167a1b 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -1452,7 +1452,7 @@ def decode_email_address(email): def gather_subscriptions(user_profile): # For now, don't display subscriptions for private messages. - subs = Subscription.objects.select_related().filter( + subs = Subscription.objects.select_related("recipient").filter( user_profile = user_profile, recipient__type = Recipient.STREAM)