create stream: Before sending notificaion, check if NOTIFICATION_BOT exists.

There might be case that NOTIFICATION_BOT is none, so before sending stream
announce notification, check first if settings.NOTIFICATION_BOT is not none.
This commit is contained in:
YJDave 2017-12-20 16:21:50 +05:30 committed by Steve Howell
parent db7943478e
commit 29905ad5d6
1 changed files with 1 additions and 1 deletions

View File

@ -374,7 +374,7 @@ def add_subscriptions_backend(
recipient_user=email_to_user_profile[email],
content=msg))
if announce and len(created_streams) > 0:
if announce and len(created_streams) > 0 and settings.NOTIFICATION_BOT is not None:
notifications_stream = user_profile.realm.get_notifications_stream()
if notifications_stream is not None:
if len(created_streams) > 1: