Use bulk_remove_subscriptions() in do_deactivate_stream().

We are deprecating do_remove_subscription().
This commit is contained in:
Steve Howell 2016-10-20 08:18:50 -07:00 committed by Tim Abbott
parent 77c75df284
commit 4ae117ed14
1 changed files with 1 additions and 1 deletions

View File

@ -530,7 +530,7 @@ def do_deactivate_stream(stream, log=True):
# type: (Stream, bool) -> None
user_profiles = UserProfile.objects.filter(realm=stream.realm)
for user_profile in user_profiles:
do_remove_subscription(user_profile, stream)
bulk_remove_subscriptions([user_profile], [stream])
was_invite_only = stream.invite_only
stream.deactivated = True