fix lasthost not getting assigned

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
Abhishek Kumar 2026-05-12 17:46:46 +05:30
parent e9c3a0d5f6
commit 3f29a959f1
1 changed files with 2 additions and 1 deletions

View File

@ -99,7 +99,8 @@ public final class UserVmJoinVOToVmConverter {
src.getHostUuid()));
}
if (hostResolver != null) {
HostJoinVO hostVo = hostResolver.apply(src.getHostId() == null ? src.getLastHostId() : src.getHostId());
Long hostId = (src.getHostId() == null || src.getHostId() == 0) ? src.getLastHostId() : src.getHostId();
HostJoinVO hostVo = hostResolver.apply(hostId);
if (hostVo != null) {
dst.setHost(buildRef(
basePath + ApiRouteHandler.BASE_ROUTE,