fix unable to detach PCI & USB device in VM edit page (#247)

* fix unable to detach PCI & USB device in VM edit page

Signed-off-by: Andy Lee <andy.lee@suse.com>

* refactor based on comment

Signed-off-by: Andy Lee <andy.lee@suse.com>

* using set from shell/utils/object

Signed-off-by: Andy Lee <andy.lee@suse.com>

---------

Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
Andy Lee
2025-04-16 16:09:33 +08:00
committed by GitHub
parent a5d4604dce
commit 2993ddb82c
3 changed files with 12 additions and 8 deletions
@@ -101,9 +101,7 @@ export default {
...formatted,
];
if (devices.length > 0) {
set(this.value.domain.devices, 'hostDevices', devices);
}
set(this.value.domain.devices, 'hostDevices', devices);
}
},