ui: backup window: avoid issuing API call with null/empty parameter

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@proxmox.com>
This commit is contained in:
Fabian Ebner 2021-05-06 14:16:27 +02:00 committed by Thomas Lamprecht
parent b85ef5ab61
commit 6d52223bac

View File

@ -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);