1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 16:51:11 +03:00

Merge pull request #2890 from mabashian/3198-survey

Fixes bug launching jt where first survey question is optional and empty

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
softwarefactory-project-zuul[bot] 2018-12-07 20:40:07 +00:00 committed by GitHub
commit 982ed37b06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,11 +49,11 @@ export default
if (scope.promptData.launchConf.survey_enabled){
scope.promptData.surveyQuestions.forEach(surveyQuestion => {
if (!scope.promptData.extraVars) {
scope.promptData.extraVars = {};
}
// grab all survey questions that have answers
if (surveyQuestion.required || (surveyQuestion.required === false && surveyQuestion.model.toString()!=="")) {
if (!scope.promptData.extraVars) {
scope.promptData.extraVars = {};
}
scope.promptData.extraVars[surveyQuestion.variable] = surveyQuestion.model;
}