mirror of https://github.com/apache/cloudstack.git
fix lasthost not getting assigned
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
parent
e9c3a0d5f6
commit
3f29a959f1
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue