Fix error display on the convert user widget
This commit is contained in:
parent
b50600cde8
commit
7ea02c186a
1 changed files with 5 additions and 8 deletions
|
@ -39,6 +39,10 @@ angular.module('quay').directive('convertUserToOrg', function () {
|
|||
|
||||
$scope.loading = true;
|
||||
|
||||
var errorHandler = ApiService.errorDisplay(function() {
|
||||
$scope.loading = false;
|
||||
});
|
||||
|
||||
var data = {
|
||||
'adminUser': $scope.org.adminUser,
|
||||
'adminPassword': $scope.org.adminPassword,
|
||||
|
@ -49,14 +53,7 @@ angular.module('quay').directive('convertUserToOrg', function () {
|
|||
CookieService.putPermanent('quay.namespace', $scope.user.username);
|
||||
UserService.load();
|
||||
$location.path('/');
|
||||
}, function(resp) {
|
||||
$scope.loading = false;
|
||||
if (resp.data.reason == 'invaliduser') {
|
||||
$('#invalidadminModal').modal({});
|
||||
} else {
|
||||
$('#cannotconvertModal').modal({});
|
||||
}
|
||||
});
|
||||
}, errorHandler);
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
Reference in a new issue