Merge pull request #1522 from coreos-inc/fix-team-list

Fix teams list in entity search
This commit is contained in:
josephschorr 2016-06-06 11:49:39 -04:00
commit a4aa5cc02a

View file

@ -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 // Note: We load the org here again so that we always have the fully up-to-date
// teams list. // teams list.
ApiService.getOrganization(null, {'orgname': $scope.namespace}).then(function(resp) { 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.handleTeamCreated = function(created) {
$scope.setEntity(created.name, 'team', false, created.avatar); $scope.setEntity(created.name, 'team', false, created.avatar);
$scope.teams[created.name] = created; $scope.teams.push(created);
}; };
$scope.handleRobotCreated = function(created) { $scope.handleRobotCreated = function(created) {