Use default subject and body if blank

This commit is contained in:
JonnyWong16 2016-10-22 16:57:26 -07:00 committed by JonnyWong16
parent 6f97036446
commit 8f22b118be

View file

@ -614,6 +614,10 @@ def build_notify_text(subject='', body='', notify_action=None, parameters=None,
default_subject = default_action.get('subject', '') default_subject = default_action.get('subject', '')
default_body = default_action.get('body', '') default_body = default_action.get('body', '')
# Use default subject and body if they are blank
subject = subject or default_subject
body = body or default_body
try: try:
subject = unicode(subject).format(**parameters) subject = unicode(subject).format(**parameters)
except LookupError as e: except LookupError as e: