mirror of https://github.com/zulip/zulip.git
streams: Fix errors when notifications_stream is deactivated.
Fixes #6225.
This commit is contained in:
parent
58ad61a4ac
commit
50fe1f7d9c
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue