DaanHoogland commented on code in PR #11138: URL: https://github.com/apache/cloudstack/pull/11138#discussion_r2207078318
########## server/src/main/java/com/cloud/resourcelimit/ResourceLimitManagerImpl.java: ########## @@ -1091,12 +1086,13 @@ public List<? extends ResourceCount> recalculateResourceCount(Long accountId, Lo throw new InvalidParameterValueException("Please specify a valid domain ID."); } _accountMgr.checkAccess(callerAccount, domain); - Account account = _entityMgr.findById(Account.class, accountId); - if (account == null) { - throw new InvalidParameterValueException("Unable to find account " + accountId); + if (accountId != null) { + Account account = _entityMgr.findById(Account.class, accountId); + if (account == null) { + throw new InvalidParameterValueException("Unable to find account " + accountId); + } + _accountMgr.verifyCallerPrivilegeForUserOrAccountOperations(account); } - _accountMgr.verifyCallerPrivilegeForUserOrAccountOperations(account); - Review Comment: this is the essential change. @Pearl1594 @hsato03 , can you have a look? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org