In preparation for the import from OVF functionality in the wizard, where the disk's volid isn't known yet (only the import source is).
Signed-off-by: Fabian Ebner <[email protected]> --- www/manager6/qemu/HDEdit.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/www/manager6/qemu/HDEdit.js b/www/manager6/qemu/HDEdit.js index 76c281c7..7acb922c 100644 --- a/www/manager6/qemu/HDEdit.js +++ b/www/manager6/qemu/HDEdit.js @@ -144,13 +144,16 @@ Ext.define('PVE.qemu.HDInputPanel', { me.drive = drive; - var values = {}; - var match = drive.file.match(/^([^:]+):/); - if (match) { - values.hdstorage = match[1]; + let values = {}; + if (drive.file) { + let match = drive.file.match(/^([^:]+):/); + if (match) { + values.hdstorage = match[1]; + } + + values.hdimage = drive.file; } - values.hdimage = drive.file; values.backup = PVE.Parser.parseBoolean(drive.backup, 1); values.noreplicate = !PVE.Parser.parseBoolean(drive.replicate, 1); values.diskformat = drive.format || 'raw'; -- 2.30.2 _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
