From c5ab6206730f8c4ab45c3098d20301b95a01cc81 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 9 Oct 2022 21:02:02 +0200 Subject: [PATCH] Fix tests --- maintenance/missing_i18n_keys.py | 2 +- src/settings.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/maintenance/missing_i18n_keys.py b/maintenance/missing_i18n_keys.py index f85b49219..a83159679 100644 --- a/maintenance/missing_i18n_keys.py +++ b/maintenance/missing_i18n_keys.py @@ -150,7 +150,7 @@ def find_expected_string_keys(): # Global settings global_config = toml.load(open(ROOT + "share/config_global.toml")) # Boring hard-coding because there's no simple other way idk - settings_without_help_key = ["smtp_relay_host", "smtp_relay_password", "smtp_relay_port", "smtp_relay_user", "ssh_port", "ssowat_panel_overlay_enabled"] + settings_without_help_key = ["smtp_relay_host", "smtp_relay_password", "smtp_relay_port", "smtp_relay_user", "ssh_port", "ssowat_panel_overlay_enabled", "root_password", "root_access_explain", "root_password_confirm"] for panel in global_config.values(): if not isinstance(panel, dict): diff --git a/src/settings.py b/src/settings.py index 2795d5562..54dfbaa22 100644 --- a/src/settings.py +++ b/src/settings.py @@ -109,8 +109,8 @@ class SettingsConfigPanel(ConfigPanel): def _apply(self): - root_password = self.new_values.pop("root_password") - root_password_confirm = self.new_values.pop("root_password_confirm") + root_password = self.new_values.pop("root_password", None) + root_password_confirm = self.new_values.pop("root_password_confirm", None) if "root_password" in self.values: del self.values["root_password"] @@ -154,7 +154,6 @@ class SettingsConfigPanel(ConfigPanel): self.values["root_password"] = "" self.values["root_password_confirm"] = "" - def get(self, key="", mode="classic"): result = super().get(key=key, mode=mode)