mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
fixed forEach console error in getChoices
This commit is contained in:
parent
529b7a1117
commit
ca4a713a42
@ -762,14 +762,16 @@ angular.module('Utilities', ['RestServices', 'Utilities', 'sanitizeFilter'])
|
||||
.success(function (data) {
|
||||
var 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
|
||||
choices.forEach(function(choice) {
|
||||
scope[variable].push({
|
||||
label: choice[1],
|
||||
value: choice[0],
|
||||
name: choice[1]
|
||||
if (choices) {
|
||||
// including 'name' property so list can be used by search
|
||||
choices.forEach(function(choice) {
|
||||
scope[variable].push({
|
||||
label: choice[1],
|
||||
value: choice[0],
|
||||
name: choice[1]
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
if (callback) {
|
||||
scope.$emit(callback);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user