mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
Fixes bug scheduling jt where first survey question is optional
This commit is contained in:
parent
e6f654b568
commit
4e37076955
@ -222,17 +222,16 @@ function PromptService (Empty, $filter) {
|
||||
};
|
||||
|
||||
this.bundlePromptDataForSaving = (params) => {
|
||||
|
||||
const promptDataToSave = params.dataToSave ? params.dataToSave : {};
|
||||
|
||||
if(params.promptData.launchConf.survey_enabled){
|
||||
if(!promptDataToSave.extra_data) {
|
||||
promptDataToSave.extra_data = {};
|
||||
}
|
||||
for (var i=0; i < params.promptData.surveyQuestions.length; i++){
|
||||
var fld = params.promptData.surveyQuestions[i].variable;
|
||||
// grab all survey questions that have answers
|
||||
if(params.promptData.surveyQuestions[i].required || (params.promptData.surveyQuestions[i].required === false && params.promptData.surveyQuestions[i].model.toString()!=="")) {
|
||||
if(!promptDataToSave.extra_data) {
|
||||
promptDataToSave.extra_data = {};
|
||||
}
|
||||
promptDataToSave.extra_data[fld] = params.promptData.surveyQuestions[i].model;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user