From ab6322a8f77700e689a9f085f0b93135df91ba29 Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Tue, 22 Oct 2019 08:44:16 -0400 Subject: [PATCH] fix a bug that breaks webhook launches when a survey is in use see: https://github.com/ansible/awx/issues/5062 --- awx/api/views/webhooks.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/awx/api/views/webhooks.py b/awx/api/views/webhooks.py index e3ed6e64c9..6be88a316b 100644 --- a/awx/api/views/webhooks.py +++ b/awx/api/views/webhooks.py @@ -1,6 +1,5 @@ from hashlib import sha1 import hmac -import json import logging import urllib.parse @@ -151,13 +150,13 @@ class WebhookReceiverBase(APIView): 'webhook_credential': obj.webhook_credential, 'webhook_guid': event_guid, }, - 'extra_vars': json.dumps({ + 'extra_vars': { 'tower_webhook_event_type': event_type, 'tower_webhook_event_guid': event_guid, 'tower_webhook_event_ref': event_ref, 'tower_webhook_status_api': status_api, 'tower_webhook_payload': request.data, - }) + } } new_job = obj.create_unified_job(**kwargs)