fix(xo-server/xapi/startVm): dont destructure options without default value

See xoa-support#3613
This commit is contained in:
Julien Fontanet 2021-04-12 10:52:41 +02:00
parent 54a0d126b5
commit 4bbe8488fc

View File

@ -1383,9 +1383,9 @@ export default class Xapi extends XapiBase {
: this.callAsync('VM.start_on', vm.$ref, host.$ref, false, false)
}
async startVm(vmId, hostId, { bypassMacAddressesCheck, force }) {
async startVm(vmId, hostId, options) {
try {
await this._startVm(this.getObject(vmId), hostId && this.getObject(hostId), { bypassMacAddressesCheck, force })
await this._startVm(this.getObject(vmId), hostId && this.getObject(hostId), options)
} catch (e) {
if (e.code === 'OPERATION_BLOCKED') {
throw forbiddenOperation('Start', e.params[1])