fix(xapi/VM_destroy): only update blocked operations when bypassBlockedOperation

This commit is contained in:
Julien Fontanet 2021-03-24 15:13:09 +01:00
parent 657935eba5
commit e6667c1782

View File

@ -301,7 +301,7 @@ module.exports = class Vm {
pCatch.call(vm.set_is_default_template(false), { code: 'MESSAGE_METHOD_UNKNOWN' }, noop),
forceDeleteDefaultTemplate && vm.update_other_config('default_template', null),
vm.set_is_a_template(false),
vm.update_blocked_operations('destroy', null),
bypassBlockedOperation && vm.update_blocked_operations('destroy', null),
])
// must be done before destroying the VM