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