quota: allow locked accounts to be credited

This commit is contained in:
Abhinandan Prateek 2015-07-29 11:25:52 +05:30
parent 7a6b536d4b
commit e4125a2999
2 changed files with 2 additions and 4 deletions

View File

@ -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");
}

View File

@ -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());