mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-1675: VMSnapshot: ListVMSnapshotsCmd should not display Domain ID in the Error Message
Description: Replace domain db id by uuid in exception message. Signed-off-by: Mice Xia <mice_xia@tcloudcomputing.com>
This commit is contained in:
parent
d8103afdf6
commit
d4e2aa32c6
|
|
@ -2138,7 +2138,6 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
|
|||
permittedAccounts, Ternary<Long, Boolean, ListProjectResourcesCriteria> domainIdRecursiveListProject,
|
||||
boolean listAll, boolean forProjectInvitation) {
|
||||
Long domainId = domainIdRecursiveListProject.first();
|
||||
|
||||
if (domainId != null) {
|
||||
Domain domain = _domainDao.findById(domainId);
|
||||
if (domain == null) {
|
||||
|
|
@ -2154,10 +2153,13 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
|
|||
}
|
||||
|
||||
Account userAccount = null;
|
||||
Domain domain = null;
|
||||
if (domainId != null) {
|
||||
userAccount = _accountDao.findActiveAccount(accountName, domainId);
|
||||
domain = _domainDao.findById(domainId);
|
||||
} else {
|
||||
userAccount = _accountDao.findActiveAccount(accountName, caller.getDomainId());
|
||||
domain = _domainDao.findById(caller.getDomainId());
|
||||
}
|
||||
|
||||
if (userAccount != null) {
|
||||
|
|
@ -2165,7 +2167,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
|
|||
//check permissions
|
||||
permittedAccounts.add(userAccount.getId());
|
||||
} else {
|
||||
throw new InvalidParameterValueException("could not find account " + accountName + " in domain " + domainId);
|
||||
throw new InvalidParameterValueException("could not find account " + accountName + " in domain " + domain.getUuid());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue