1
0
mirror of https://github.com/laurivosandi/certidude synced 2024-12-22 16:25:17 +00:00

Add fallbacks for e-mail handling if outbox is not defined

This commit is contained in:
Lauri Võsandi 2016-09-18 14:32:39 +03:00
parent 1b04a848e3
commit 23d8942ffe

View File

@ -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)