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

* 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>
(cherry picked from commit 2993ddb82c)

Co-authored-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
mergify[bot]
2025-04-16 16:13:12 +08:00
committed by GitHub
co-authored by Andy Lee
parent 31682dd165
commit f2e8cce29f
3 changed files with 12 additions and 8 deletions
@@ -84,9 +84,7 @@ export default {
...formatted,
];
if (devices.length > 0) {
set(this.value.domain.devices, 'hostDevices', devices);
}
set(this.value.domain.devices, 'hostDevices', devices);
}
},