mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-25 17:22:33 +02:00
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…
x
Reference in New Issue
Block a user