diff --git a/notifications/handlers.py b/notifications/handlers.py index 9d11ad69..720ed07c 100644 --- a/notifications/handlers.py +++ b/notifications/handlers.py @@ -13,7 +13,8 @@ class NotificationHandler(logging.Handler): notif.title = "%s [%s:%s]" % (record.levelname, record.funcName, record.lineno) notif.level = str([item[0] for item in Notification.LEVEL_CHOICES if item[1] == record.levelname][0]) message = record.getMessage() - message = message + "\n\n" - message = message + record.exc_text + if record.exc_text: + message = message + "\n\n" + message = message + record.exc_text notif.message = message notif.save()