Don't use default subject/body with blank notification text

* Allow different notifications using the media type tags
This commit is contained in:
JonnyWong16 2017-01-29 17:31:47 -08:00
parent 957c7aeab9
commit 304c2429bb
2 changed files with 1 additions and 7 deletions

View file

@ -602,12 +602,6 @@ def build_notify_text(subject='', body='', notify_action=None, parameters=None,
subject = strip_tag(re.sub(pattern, '', subject), agent_id)
body = strip_tag(re.sub(pattern, '', body), agent_id)
# Use default subject and body if they are blank
# only if the notification is not script
if agent_id != 15:
subject = subject or default_subject
body = body or default_body
if test:
return subject, body