mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 19:51:08 -03:30
fixed forEach console error in getChoices
This commit is contained in:
@@ -762,14 +762,16 @@ angular.module('Utilities', ['RestServices', 'Utilities', 'sanitizeFilter'])
|
|||||||
.success(function (data) {
|
.success(function (data) {
|
||||||
var choices;
|
var choices;
|
||||||
choices = (choice_name) ? data.actions.GET[field][choice_name] : data.actions.GET[field].choices;
|
choices = (choice_name) ? data.actions.GET[field][choice_name] : data.actions.GET[field].choices;
|
||||||
// including 'name' property so list can be used by search
|
if (choices) {
|
||||||
choices.forEach(function(choice) {
|
// including 'name' property so list can be used by search
|
||||||
scope[variable].push({
|
choices.forEach(function(choice) {
|
||||||
label: choice[1],
|
scope[variable].push({
|
||||||
value: choice[0],
|
label: choice[1],
|
||||||
name: choice[1]
|
value: choice[0],
|
||||||
|
name: choice[1]
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
if (callback) {
|
if (callback) {
|
||||||
scope.$emit(callback);
|
scope.$emit(callback);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user