mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-12 08:16:06 -07:00
Use default subject and body if blank
This commit is contained in:
parent
6f97036446
commit
8f22b118be
1 changed files with 4 additions and 0 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue