fix(xo-server/xapi/startVm): dont destructure options without default value
See xoa-support#3613
This commit is contained in:
parent
54a0d126b5
commit
4bbe8488fc
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user