From df874966a6ea76b4142d447c054973efc2e122a0 Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Wed, 28 Oct 2020 13:03:34 -0400 Subject: [PATCH] fix a display bug in webhook notifications with unicode characters see: https://github.com/ansible/awx/issues/7400 --- awx/main/notifications/webhook_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/notifications/webhook_backend.py b/awx/main/notifications/webhook_backend.py index a33cf026f8..69628d72b4 100644 --- a/awx/main/notifications/webhook_backend.py +++ b/awx/main/notifications/webhook_backend.py @@ -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: