fix(vm.migrate): handle empty optional sr param
Fixes vatesfr/xo-web#2248
This commit is contained in:
parent
6089ebae2a
commit
46067a4e56
@ -453,7 +453,7 @@ migrate = $coroutine ({
|
||||
throw unauthorized()
|
||||
|
||||
yield @getXapi(vm).migrateVm(vm._xapiId, @getXapi(host), host._xapiId, {
|
||||
sr: @getObject(sr, 'SR')._xapiId
|
||||
sr: sr && @getObject(sr, 'SR')._xapiId
|
||||
migrationNetworkId: migrationNetwork?._xapiId
|
||||
mapVifsNetworks: mapVifsNetworksXapi,
|
||||
mapVdisSrs: mapVdisSrsXapi,
|
||||
|
Loading…
Reference in New Issue
Block a user