diff options
| -rw-r--r-- | src/blog_node5_net.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/blog_node5_net.py b/src/blog_node5_net.py index 94a1872..7857a85 100644 --- a/src/blog_node5_net.py +++ b/src/blog_node5_net.py @@ -157,7 +157,8 @@ def post_comment(): if key == 'contact' and not args['show_contact']: continue # Skip contact, if not public for privacy notification_message += f'\n{key[0].upper()}{key[1:]}: {args.get(key)}' - telegram.send_message(notification_message) + if 'telegram' in locals(): + telegram.send_message(notification_message) db.post_comment(**args) return flask.redirect(flask.request.referrer) |
