From d74b675b69c02c9bcad949dac0e450b7249481dd Mon Sep 17 00:00:00 2001 From: Ivan Efimov Date: Mon, 20 Dec 2021 01:28:32 -0600 Subject: [PATCH] Presets: fix for loading broken BATCH configs - 'Save anyway' button did not work --- src/tabs/presets/presets.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tabs/presets/presets.js b/src/tabs/presets/presets.js index 46ecb976..6962187c 100644 --- a/src/tabs/presets/presets.js +++ b/src/tabs/presets/presets.js @@ -123,7 +123,12 @@ TABS.presets.setupMenuButtons = function() { }); this._domButtonaSaveAnyway.on("click", () => { this._domDialogCliErrors.close(); - this.cliEngine.sendLine(CliEngine.s_commandSave); + this.cliEngine.sendLine(CliEngine.s_commandSave, null, () => { + // In case of batch CLI commands errors Firmware requeires extra "save" comand for CLI safety. + // No need for this safety in presets as preset tab already detected errors and showed them to the user. + // At this point user clicked "save anyway". + this.cliEngine.sendLine(CliEngine.s_commandSave); + }); this.disconnectCliMakeSure(); }); this._domButtonSaveBackup.on("click", () => this.onSaveConfigClick());