Fix teams list in entity search
The new version of Angular 1 no longer allows us to loop over an object, so we construct an array instead. Fixes #1519
This commit is contained in:
parent
3351195480
commit
b06b5b420a
1 changed files with 4 additions and 2 deletions
|
@ -78,7 +78,9 @@ angular.module('quay').directive('entitySearch', function () {
|
|||
// Note: We load the org here again so that we always have the fully up-to-date
|
||||
// teams list.
|
||||
ApiService.getOrganization(null, {'orgname': $scope.namespace}).then(function(resp) {
|
||||
$scope.teams = resp.teams;
|
||||
$scope.teams = Object.keys(resp.teams).map(function(key) {
|
||||
return resp.teams[key];
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -113,7 +115,7 @@ angular.module('quay').directive('entitySearch', function () {
|
|||
|
||||
$scope.handleTeamCreated = function(created) {
|
||||
$scope.setEntity(created.name, 'team', false, created.avatar);
|
||||
$scope.teams[created.name] = created;
|
||||
$scope.teams.push(created);
|
||||
};
|
||||
|
||||
$scope.handleRobotCreated = function(created) {
|
||||
|
|
Reference in a new issue