mirror of
https://github.com/ansible/awx.git
synced 2026-03-29 06:45:09 -02:30
Fixes bug launching jt where first survey question is optional and empty
This commit is contained in:
@@ -49,11 +49,11 @@ export default
|
|||||||
|
|
||||||
if (scope.promptData.launchConf.survey_enabled){
|
if (scope.promptData.launchConf.survey_enabled){
|
||||||
scope.promptData.surveyQuestions.forEach(surveyQuestion => {
|
scope.promptData.surveyQuestions.forEach(surveyQuestion => {
|
||||||
|
if (!scope.promptData.extraVars) {
|
||||||
|
scope.promptData.extraVars = {};
|
||||||
|
}
|
||||||
// grab all survey questions that have answers
|
// grab all survey questions that have answers
|
||||||
if (surveyQuestion.required || (surveyQuestion.required === false && surveyQuestion.model.toString()!=="")) {
|
if (surveyQuestion.required || (surveyQuestion.required === false && surveyQuestion.model.toString()!=="")) {
|
||||||
if (!scope.promptData.extraVars) {
|
|
||||||
scope.promptData.extraVars = {};
|
|
||||||
}
|
|
||||||
scope.promptData.extraVars[surveyQuestion.variable] = surveyQuestion.model;
|
scope.promptData.extraVars[surveyQuestion.variable] = surveyQuestion.model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user