followup code cleanup

actually cleaning up the initial state, the last patch was OK as is..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-11-24 13:38:50 +01:00
parent 93489d898b
commit c2d24034d5

View File

@ -65,18 +65,14 @@ Ext.define('PVE.panel.StoragePruneInputPanel', {
onGetValues: function(formValues) {
delete formValues.delete;
let retention = PVE.Parser.printPropertyString(formValues)
// always delete old 'maxfiles', we map it to keep-last on edit win load
if (retention === '') {
if (this.isCreate) {
return {};
} else {
return {
delete: [
'prune-backups',
'maxfiles',
],
};
}
// always delete old 'maxfiles' on edit, we map it to keep-last on window load
return {
delete: ['prune-backups','maxfiles'],
};
}
let options = { 'prune-backups': retention };
if (!this.isCreate) {