diff --git a/awx/ui/client/src/job-templates/survey-maker/surveys/init.factory.js b/awx/ui/client/src/job-templates/survey-maker/surveys/init.factory.js index 9f0cf8ea1f..31e584b946 100644 --- a/awx/ui/client/src/job-templates/survey-maker/surveys/init.factory.js +++ b/awx/ui/client/src/job-templates/survey-maker/surveys/init.factory.js @@ -434,6 +434,11 @@ export default } data.choices = (scope.type.type === "multiplechoice") ? scope.choices : (scope.type.type === 'multiselect') ? scope.choices : "" ; + if (data.choices !== "") { + // remove duplicates from the choices + data.choices = _.uniq(data.choices.split("\n")).join("\n"); + } + Wait('stop'); if(scope.mode === 'add' || scope.mode==="edit" && scope.can_edit === true){ $('#survey-save-button').removeAttr('disabled');