mirror of
https://github.com/ansible/awx.git
synced 2026-01-10 15:32:07 -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:
parent
c8682b7820
commit
dda00e98f5
@ -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] = "";
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user