streams: Fix errors when notifications_stream is deactivated.

Fixes #6225.
This commit is contained in:
Vishnu Ks 2017-08-24 06:05:16 +05:30 committed by Tim Abbott
parent 58ad61a4ac
commit 50fe1f7d9c
1 changed files with 1 additions and 1 deletions

View File

@ -313,7 +313,7 @@ def add_subscriptions_backend(request, user_profile,
content=msg))
if announce and len(created_streams) > 0:
notifications_stream = user_profile.realm.notifications_stream # type: Optional[Stream]
notifications_stream = user_profile.realm.get_notifications_stream()
if notifications_stream is not None:
if len(created_streams) > 1:
stream_msg = "the following streams: %s" % (", ".join('#**%s**' % s.name for s in created_streams))