Fetch stream.realm information when fetching default streams

(imported from commit 08eb32e6ecda75b17d6532b0421c371de2327027)
This commit is contained in:
Leo Franchi 2013-09-26 15:08:24 -04:00
parent f6d8a01678
commit 1e6b83b6c8
1 changed files with 1 additions and 1 deletions

View File

@ -1106,7 +1106,7 @@ def set_default_streams(realm, stream_names):
def get_default_subs(user_profile):
return [default.stream for default in
DefaultStream.objects.select_related("stream").filter(realm=user_profile.realm)]
DefaultStream.objects.select_related("stream", "stream__realm").filter(realm=user_profile.realm)]
def do_update_user_activity_interval(user_profile, log_time):
effective_end = log_time + datetime.timedelta(minutes=15)