mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 07:23:22 +00:00
gather_subscriptions: Fix confusing overwriting of local variable stream.
(imported from commit cfe369869de5f13579ff0e0b91ec0a735e2fe81c)
This commit is contained in:
@@ -1457,18 +1457,18 @@ def gather_subscriptions(user_profile):
|
||||
if stream.invite_only and not sub.active:
|
||||
subscribers = None
|
||||
|
||||
stream = {'name': stream.name,
|
||||
stream_dict = {'name': stream.name,
|
||||
'in_home_view': sub.in_home_view,
|
||||
'invite_only': stream.invite_only,
|
||||
'color': sub.color,
|
||||
'notifications': sub.notifications,
|
||||
'email_address': encode_email_address(stream)}
|
||||
if subscribers is not None:
|
||||
stream['subscribers'] = subscribers
|
||||
stream_dict['subscribers'] = subscribers
|
||||
if sub.active:
|
||||
subscribed.append(stream)
|
||||
subscribed.append(stream_dict)
|
||||
else:
|
||||
unsubscribed.append(stream)
|
||||
unsubscribed.append(stream_dict)
|
||||
|
||||
return (sorted(subscribed), sorted(unsubscribed))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user