diff --git a/ohlhafv/views.py b/ohlhafv/views.py index 3bdc801..9db1669 100644 --- a/ohlhafv/views.py +++ b/ohlhafv/views.py @@ -50,12 +50,16 @@ def ohlhafv_submit(request, *args, **kwargs): ) send_email(email, subject, message) - tg_message = render_to_string( - 'ohlhafv:tgmsg.tpl', { - 'challenge': challenge, - 'url': url}) - bot = TelegramBot() - bot.broadcast(tg_message) + try: + tg_message = render_to_string( + 'ohlhafv:tgmsg.tpl', { + 'challenge': challenge, + 'url': url}) + bot = TelegramBot() + bot.broadcast(tg_message) + except: # tg spam is not critical. Ignore on failure + pass + logging.debug( 'Sent ohlhafv email to recipient <{}>'.format(email)) else: