refactor: Use subs_to_add in return value.

The subs_to_add is directly related to a var
called new_subs, which I hope to eliminate
soon.
This commit is contained in:
Steve Howell
2020-10-12 22:01:41 +00:00
committed by Tim Abbott
parent 1afca3d430
commit 8c70fbde78

View File

@@ -2926,7 +2926,7 @@ def bulk_add_subscriptions(streams: Iterable[Stream],
all_subscribers_by_stream=all_subscribers_by_stream,
)
return ([(user_profile, stream) for (user_profile, recipient_id, stream) in new_subs] +
return ([(sub.user_profile, stream) for (sub, stream) in subs_to_add] +
[(sub.user_profile, stream) for (sub, stream) in subs_to_activate],
already_subscribed)