mirror of https://github.com/apache/cloudstack.git
quota: allow locked accounts to be credited
This commit is contained in:
parent
7a6b536d4b
commit
e4125a2999
|
|
@ -87,7 +87,7 @@ public class QuotaCreditsCmd extends BaseCmd {
|
|||
|
||||
@Override
|
||||
public void execute() {
|
||||
Long accountId = _accountService.finalyzeAccountId(accountName, domainId, null, true);
|
||||
Long accountId = _accountService.getActiveAccountByName(accountName, domainId).getAccountId();
|
||||
if (accountId == null) {
|
||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "The account does not exists or has been removed/disabled");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,9 +109,7 @@ public class QuotaResponseBuilderImpl implements QuotaResponseBuilder {
|
|||
boolean consecutive=true;
|
||||
for (Iterator<QuotaBalanceVO> it = quotaBalance.iterator(); it.hasNext();) {
|
||||
QuotaBalanceVO entry = it.next();
|
||||
// s_logger.info("Date=" + entry.getUpdatedOn().toGMTString() +
|
||||
// " balance=" + entry.getCreditBalance() + " credit=" +
|
||||
// entry.getCreditsId());
|
||||
s_logger.info("Date=" + entry.getUpdatedOn().toGMTString() + " balance=" + entry.getCreditBalance() + " credit=" + entry.getCreditsId());
|
||||
if (entry.getCreditsId() > 0) {
|
||||
if (consecutive){
|
||||
lastCredits = lastCredits.add(entry.getCreditBalance());
|
||||
|
|
|
|||
Loading…
Reference in New Issue