From e0d1e8135c887b5c1f0ca4bc2f596609f42103f6 Mon Sep 17 00:00:00 2001 From: gconsidine Date: Mon, 17 Jul 2017 10:55:44 -0400 Subject: [PATCH] Change the value of an SSH credentials privilege Include the literal string value instead of the index of the value in the choices array --- awx/ui/client/lib/components/input/group.directive.js | 2 +- awx/ui/client/lib/components/input/select.directive.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/ui/client/lib/components/input/group.directive.js b/awx/ui/client/lib/components/input/group.directive.js index cdb14b0e58..7570a42cf3 100644 --- a/awx/ui/client/lib/components/input/group.directive.js +++ b/awx/ui/client/lib/components/input/group.directive.js @@ -99,7 +99,7 @@ function AtInputGroupController ($scope, $compile) { config._component = 'at-input-select'; config._format = 'array'; config._data = input.choices; - config._exp = 'index as choice for (index, choice) in state._data'; + config._exp = 'choice for (index, choice) in state._data'; } else { let preface = vm.strings.get('group.UNSUPPORTED_ERROR_PREFACE'); throw new Error(`${preface}: ${input.type}`) diff --git a/awx/ui/client/lib/components/input/select.directive.js b/awx/ui/client/lib/components/input/select.directive.js index b86f1f8933..4167eac0e5 100644 --- a/awx/ui/client/lib/components/input/select.directive.js +++ b/awx/ui/client/lib/components/input/select.directive.js @@ -59,7 +59,7 @@ function AtInputSelectController (baseInputController, eventService) { vm.updateDisplayModel = () => { if (scope.state._format === 'array') { - scope.displayModel = scope.state._data[scope.state._value]; + scope.displayModel = scope.state._value; } else if (scope.state._format === 'objects') { scope.displayModel = scope.state._value[scope.state._display]; } else if (scope.state._format === 'grouped-object') {