we have to set it to '__default__' if we didn't get one from the API
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[ TL: fix-up eslint warning ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
rec.commit();
}
let prepareVirtio = me.lookup('mapSata').getValue();
- me.lookup('scsihw').setValue(prepareVirtio && isWindows ? 'virtio-scsi-single' : me.getView().vmConfig.scsihw);
+ let defaultScsiHw = me.getView().vmConfig.scsihw ?? '__default__';
+ me.lookup('scsihw').setValue(prepareVirtio && isWindows ? 'virtio-scsi-single' : defaultScsiHw);
me.refreshGrids();
},
xtype: 'pveScsiHwSelector',
reference: 'scsihw',
name: 'scsihw',
+ value: '__default__',
submitValue: false,
fieldLabel: gettext('SCSI Controller'),
},