[pve-devel] [PATCH v5 manager 1/6] ui: backup window: avoid issuing API call with null/empty parameter

Fabian Ebner f.ebner at proxmox.com
Thu May 6 14:16:27 CEST 2021


could be triggered when there are no backup storages at all configured or if
the 'Backup now' button is clicked before the storage selector from the guests
'Backup' tab could load its store.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 www/manager6/window/Backup.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/www/manager6/window/Backup.js b/www/manager6/window/Backup.js
index a6dc1798..72e8cb48 100644
--- a/www/manager6/window/Backup.js
+++ b/www/manager6/window/Backup.js
@@ -46,6 +46,10 @@ Ext.define('PVE.window.Backup', {
 	    allowBlank: false,
 	    listeners: {
 		change: function(f, v) {
+		    if (v === null || v === undefined || v === '') {
+			return;
+		    }
+
 		    let store = f.getStore();
 		    let rec = store.findRecord('storage', v, 0, false, true, true);
 
-- 
2.20.1






More information about the pve-devel mailing list