From d8e736c900484bad88b4e414ad6bcc027aa1c7c7 Mon Sep 17 00:00:00 2001 From: chouseknecht Date: Sat, 29 Jun 2013 07:12:26 -0400 Subject: [PATCH] Fixed extra_vars issue on Job Templates. We are now able to successfully send and receive extra_vars back and forth with the API without any errors or conversion issues. --- awx/ui/static/js/controllers/JobTemplates.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/ui/static/js/controllers/JobTemplates.js b/awx/ui/static/js/controllers/JobTemplates.js index 46aafcc894..c37cb484ee 100644 --- a/awx/ui/static/js/controllers/JobTemplates.js +++ b/awx/ui/static/js/controllers/JobTemplates.js @@ -267,7 +267,7 @@ function JobTemplatesAdd ($scope, $rootScope, $compile, $location, $log, $routeP } } } - data.extra_vars = json_data; + data.extra_vars = JSON.stringify(json_data, undefined, '\t'); Rest.setUrl(defaultUrl); Rest.post(data) .success( function(data, status, headers, config) { @@ -489,7 +489,7 @@ function JobTemplatesEdit ($scope, $rootScope, $compile, $location, $log, $route } } } - data.extra_vars = json_data; + data.extra_vars = JSON.stringify(json_data, undefined, '\t'); Rest.setUrl(defaultUrl + id + '/'); Rest.put(data) .success( function(data, status, headers, config) {