skip missing inventory prompt value check when selecting workflow node

This commit is contained in:
Jake McDermott 2018-11-23 17:32:57 -05:00 committed by mabashian
parent 7b4521f980
commit 65ec1d18ad

View File

@ -91,12 +91,19 @@ export default ['$scope', 'TemplatesService', 'JobTemplateModel', 'PromptService
];
promptWatcher = $scope.$watchGroup(promptDataToWatch, () => {
const templateType = _.get($scope, 'promptData.templateType');
let missingPromptValue = false;
if ($scope.missingSurveyValue) {
missingPromptValue = true;
} else if (!$scope.promptData.prompts.inventory.value || !$scope.promptData.prompts.inventory.value.id) {
missingPromptValue = true;
}
if (templateType !== "workflow_job_template") {
if (!$scope.promptData.prompts.inventory.value || !$scope.promptData.prompts.inventory.value.id) {
missingPromptValue = true;
}
}
$scope.promptModalMissingReqFields = missingPromptValue;
});