mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 18:40:01 -03:30
Fix an issue with the email notifier
Incorrect body format assumptions in the email notifier
This commit is contained in:
parent
edabf23c6a
commit
f286dc7486
@ -20,9 +20,12 @@ class CustomEmailBackend(EmailBackend):
|
||||
sender_parameter = "sender"
|
||||
|
||||
def format_body(self, body):
|
||||
body_actual = smart_text("{} #{} had status {} on Ansible Tower, view details at {}\n\n".format(body['friendly_name'],
|
||||
body['id'],
|
||||
body['status'],
|
||||
body['url']))
|
||||
body_actual += pprint.pformat(body, indent=4)
|
||||
if "body" in body:
|
||||
body_actual = body['body']
|
||||
else:
|
||||
body_actual = smart_text("{} #{} had status {} on Ansible Tower, view details at {}\n\n".format(body['friendly_name'],
|
||||
body['id'],
|
||||
body['status'],
|
||||
body['url']))
|
||||
body_actual += pprint.pformat(body, indent=4)
|
||||
return body_actual
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user