mirror of https://github.com/apache/cloudstack.git
quota: fixed permisison and date flip
This commit is contained in:
parent
7c4c67b520
commit
2f7ebc7c54
|
|
@ -112,7 +112,7 @@ public class QuotaBalanceCmd extends BaseCmd {
|
|||
|
||||
@Override
|
||||
public long getEntityOwnerId() {
|
||||
Long accountId = _accountService.finalyzeAccountId(accountName, domainId, null, true);
|
||||
Long accountId = _accountService.getActiveAccountByName(accountName, domainId).getAccountId();
|
||||
if (accountId == null) {
|
||||
return CallContext.current().getCallingAccount().getId();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ public class QuotaServiceImpl extends ManagerBase implements QuotaService, Confi
|
|||
} else if (endDate.after(startOfNextDay(new Date()))) {
|
||||
throw new InvalidParameterValueException("Incorrect Date Range. End date:" + endDate + " should not be in future. ");
|
||||
} else if (startDate.before(endDate)) {
|
||||
Date adjustedEndDate = startOfNextDay(endDate);
|
||||
Date adjustedEndDate = computeAdjustedTime(startOfNextDay(endDate));
|
||||
s_logger.debug("Getting quota balance records for account: " + accountId + ", domainId: " + domainId + ", between " + adjustedStartDate + " and " + adjustedEndDate);
|
||||
List<QuotaBalanceVO> qbrecords = _quotaBalanceDao.findQuotaBalance(accountId, domainId, adjustedStartDate, adjustedEndDate);
|
||||
s_logger.info("Found records size=" + qbrecords.size());
|
||||
|
|
|
|||
Loading…
Reference in New Issue