fix a display bug in webhook notifications with unicode characters

see: https://github.com/ansible/awx/issues/7400
This commit is contained in:
Ryan Petrello 2020-10-28 13:03:34 -04:00
parent b5c2a6ad65
commit df874966a6
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777

View File

@ -68,7 +68,7 @@ class WebhookBackend(AWXBaseEmailBackend, CustomNotificationBase):
auth = (self.username, self.password)
r = chosen_method("{}".format(m.recipients()[0]),
auth=auth,
json=m.body,
data=json.dumps(m.body, ensure_ascii=False).encode('utf-8'),
headers=self.headers,
verify=(not self.disable_ssl_verification))
if r.status_code >= 400: