From 23d8942ffeeee72e21330bd8ecc5bfb5e91bbc3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Sun, 18 Sep 2016 14:32:39 +0300 Subject: [PATCH] Add fallbacks for e-mail handling if outbox is not defined --- certidude/push.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/certidude/push.py b/certidude/push.py index c05f4f0..535bdf7 100644 --- a/certidude/push.py +++ b/certidude/push.py @@ -11,6 +11,10 @@ def publish(event_type, event_data): """ Publish event on push server """ + if not config.PUSH_PUBLISH: + # Push server disabled + return + if not isinstance(event_data, basestring): from certidude.decorators import MyEncoder event_data = json.dumps(event_data, cls=MyEncoder)