actions: Remove duplicated conditional.

In the gather_subscriptions_helper functions, there was a repeated
conditional inside one another.
This commit is contained in:
Clara Dantas 2020-07-30 15:02:22 -03:00 committed by Tim Abbott
parent 4cd23103db
commit 6b011b241b
1 changed files with 4 additions and 4 deletions

View File

@ -5017,11 +5017,11 @@ def gather_subscriptions_helper(user_profile: UserProfile,
stream_dict['is_announcement_only'] = \
stream['stream_post_policy'] == Stream.STREAM_POST_POLICY_ADMINS
if is_public or user_profile.is_realm_admin:
subscribers = subscriber_map[stream["id"]]
if subscribers is not None:
stream_dict['subscribers'] = subscribers
subscribers = subscriber_map[stream["id"]]
if subscribers is not None:
stream_dict['subscribers'] = subscribers
never_subscribed.append(stream_dict)
return (sorted(subscribed, key=lambda x: x['name']),
sorted(unsubscribed, key=lambda x: x['name']),
sorted(never_subscribed, key=lambda x: x['name']))