mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 11:41:08 -03:30
Fixing job submission for textarea
if textarea min is set to 0 and the question is optional, then the UI will pass the API and empty string to the job launch endpoint
This commit is contained in:
@@ -81,7 +81,7 @@ angular.module('JobSubmissionHelper', [ 'RestServices', 'Utilities', 'Credential
|
||||
job_launch_data.extra_vars[fld] = scope[fld];
|
||||
}
|
||||
// for optional text and text-areas, submit a blank string if min length is 0
|
||||
if(scope.survey_questions[i].required === false && (scope.survey_questions[i].type === "text" || scope.survey_questions[i].type === "textarea") && scope.survey_questions[i].min === 0 && scope[fld] ===""){
|
||||
if(scope.survey_questions[i].required === false && (scope.survey_questions[i].type === "text" || scope.survey_questions[i].type === "textarea") && scope.survey_questions[i].min === 0 && (scope[fld] === "" || scope[fld] === undefined)){
|
||||
job_launch_data.extra_vars[fld] = "";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user