mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-04 21:26:08 +08:00
fix: 'No Media' image selection removes 'harvesterhci.io/os' label from VM CR (#941)
When editing a Virtual Machine's volumes, if the user selects 'No media' for the Image, the 'harvesterhci.io/os' label is incorrectly removed from the VM's metadata. Related to: https://github.com/harvester/harvester/issues/10947 Signed-off-by: Volker Theile <vtheile@suse.com>
This commit is contained in:
@@ -1742,7 +1742,7 @@ export default {
|
|||||||
|
|
||||||
const oldImageId = old[0]?.image;
|
const oldImageId = old[0]?.image;
|
||||||
|
|
||||||
if (this.isCreate && oldImageId === imageId && imageId) {
|
if (this.isCreate && oldImageId !== imageId && imageId && osType) {
|
||||||
this.osType = osType;
|
this.osType = osType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user