mirror of https://github.com/zulip/zulip.git
Use bulk_remove_subscriptions() in do_deactivate_stream().
We are deprecating do_remove_subscription().
This commit is contained in:
parent
77c75df284
commit
4ae117ed14
|
@ -530,7 +530,7 @@ def do_deactivate_stream(stream, log=True):
|
||||||
# type: (Stream, bool) -> None
|
# type: (Stream, bool) -> None
|
||||||
user_profiles = UserProfile.objects.filter(realm=stream.realm)
|
user_profiles = UserProfile.objects.filter(realm=stream.realm)
|
||||||
for user_profile in user_profiles:
|
for user_profile in user_profiles:
|
||||||
do_remove_subscription(user_profile, stream)
|
bulk_remove_subscriptions([user_profile], [stream])
|
||||||
|
|
||||||
was_invite_only = stream.invite_only
|
was_invite_only = stream.invite_only
|
||||||
stream.deactivated = True
|
stream.deactivated = True
|
||||||
|
|
Loading…
Reference in New Issue