From cf64423cdd31358ee2e383217ea224e46fb5662a Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 27 Mar 2018 14:19:45 +0200 Subject: [PATCH] controller: StorageEdit: check if 'maxfiles' could be looked up Allows to extend our, in the ext patch introduced, storage base class to use the controller for all storage plugins without breaking those which cannot host backups - i.e., all block based storages Signed-off-by: Thomas Lamprecht --- www/manager6/controller/StorageEdit.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/www/manager6/controller/StorageEdit.js b/www/manager6/controller/StorageEdit.js index fc0900469..a10c8fc9e 100644 --- a/www/manager6/controller/StorageEdit.js +++ b/www/manager6/controller/StorageEdit.js @@ -6,6 +6,9 @@ Ext.define('PVE.controller.StorageEdit', { change: function(field, value) { var hasBackups = Ext.Array.contains(value, 'backup'); var maxfiles = this.lookupReference('maxfiles'); + if (!maxfiles) { + return; + } if (!hasBackups) { // clear values which will never be submitted