Merge "Fix batch delete key pairs button isn't disabled when the key pair has deleted"

This commit is contained in:
Zuul 2018-02-27 12:12:57 +00:00 committed by Gerrit Code Review
commit bf323d9e55

View File

@ -82,8 +82,10 @@
actionResult.failed(resourceType, item.context.id);
});
if (actionResult.result.failed.length === 0 && actionResult.result.deleted.length > 0) {
$location.path("/project/key_pairs");
var path = '/project/key_pairs';
if ($location.url() !== path && actionResult.result.failed.length === 0 &&
actionResult.result.deleted.length > 0) {
$location.path(path);
} else {
return actionResult.result;
}