fix: Creating a VM with no cloud init user data but network data only fails (#1044) (#1045)

Related to: https://github.com/harvester/harvester/issues/11213


(cherry picked from commit a178302f73fe15ca0bdad3208ee1f937dd3c12d6)

Signed-off-by: Volker Theile <vtheile@suse.com>
Co-authored-by: Volker Theile <vtheile@suse.com>
This commit is contained in:
mergify[bot] 2026-07-21 11:09:55 +08:00 committed by GitHub
parent 82e7b0da19
commit eb4c0504c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -914,7 +914,7 @@ export default {
}
}
if (!disks.find( (D) => D.name === 'cloudinitdisk') && (this.userData || this.networkData)) {
if (!disks.find( (D) => D.name === 'cloudinitdisk') && (this.userData || this.networkScript)) {
if (!this.isWindows) {
disks.push({
name: 'cloudinitdisk',