mirror of https://github.com/apache/cloudstack.git
Fix: NPE thrown on VMware to KVM migration tasks listing for removed VMs (#11892)
This commit is contained in:
parent
2fcf96267d
commit
4b74a99a57
|
|
@ -209,7 +209,10 @@ public class ImportVmTasksManagerImpl implements ImportVmTasksManager {
|
|||
}
|
||||
if (task.getVmId() != null) {
|
||||
UserVmVO userVm = userVmDao.findById(task.getVmId());
|
||||
response.setVirtualMachineId(userVm.getUuid());
|
||||
if (userVm != null) {
|
||||
// Migrated VM could have been removed from CloudStack after the migration
|
||||
response.setVirtualMachineId(userVm.getUuid());
|
||||
}
|
||||
}
|
||||
response.setCreated(task.getCreated());
|
||||
response.setLastUpdated(task.getUpdated());
|
||||
|
|
|
|||
Loading…
Reference in New Issue