fix vmtype listing issue

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
Abhishek Kumar 2026-05-13 12:45:50 +05:30
parent 1c32efcdc3
commit 789764a272
1 changed files with 5 additions and 1 deletions

View File

@ -849,7 +849,11 @@ public class UserVmJoinDaoImpl extends GenericDaoBaseWithTagInformation<UserVmJo
List<String> excludeTypes, List<Long> accountIds, String domainPath, Filter filter) {
SearchBuilder<UserVmJoinVO> sb = createSearchBuilder();
sb.and("hypervisorType", sb.entity().getHypervisorType(), Op.EQ);
sb.and("type", sb.entity().getUserVmType(), Op.NOTIN);
if (CollectionUtils.isNotEmpty(excludeTypes)) {
sb.and().op("typeNull", sb.entity().getUserVmType(), Op.NULL);
sb.or("type", sb.entity().getUserVmType(), Op.NOTIN);
sb.cp();
}
boolean accountIdsNotEmpty = CollectionUtils.isNotEmpty(accountIds);
boolean domainPathNotBlank = StringUtils.isNotBlank(domainPath);
if (accountIdsNotEmpty || domainPathNotBlank) {