notification bot: Remove check for existence in add_subscriptions_backend.

We implicitly assume settings.NOTIFICATION_BOT is not None just a few lines
above, in
sender = get_system_bot(settings.NOTIFICATION_BOT)
notifications.append(
    internal_prep_private_message(
        realm=user_profile.realm,
        sender=sender,
        ...
This commit is contained in:
Rishi Gupta 2019-07-11 12:07:29 -07:00 committed by Tim Abbott
parent 6c8569d99f
commit c3adafbee9
1 changed files with 1 additions and 1 deletions

View File

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