From 6fccee404a83a7eb1e671ebcbe1a76f13c5aca92 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Mon, 5 Jan 2015 18:18:49 -0500 Subject: [PATCH] Job Submission The job submission should NOT send an empty extra_vars dict if no extra variable are collected as a result of the job submission prompts. I was under the impression that an empty extra vars dict would be disregarded. An empty extra_vars dict will in fact overwrite any extra_vars in the JT with a blank set of extra_vars --- awx/ui/static/js/helpers/JobSubmission.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/awx/ui/static/js/helpers/JobSubmission.js b/awx/ui/static/js/helpers/JobSubmission.js index 183c8f9db5..3dab45c91e 100644 --- a/awx/ui/static/js/helpers/JobSubmission.js +++ b/awx/ui/static/js/helpers/JobSubmission.js @@ -78,6 +78,9 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential if(!Empty(scope.credential)){ job_launch_data.credential_id = scope.credential; } + if(jQuery.isEmptyObject(job_launch_data.extra_vars)===true){ + delete job_launch_data.extra_vars; + } Rest.setUrl(url); Rest.post(job_launch_data)