From f8fed701b95d607a842ef1357aacc7f418502cdc Mon Sep 17 00:00:00 2001 From: ljf Date: Sun, 12 Sep 2021 17:43:03 +0200 Subject: [PATCH] [fix] Raise an error if question has not been initialize --- src/yunohost/utils/config.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/yunohost/utils/config.py b/src/yunohost/utils/config.py index 9701bf966..488cb54a3 100644 --- a/src/yunohost/utils/config.py +++ b/src/yunohost/utils/config.py @@ -279,8 +279,11 @@ class ConfigPanel: # Hydrating config panel with current value logger.debug("Hydrating config with current values") for _, _, option in self._iterate(): - if option["name"] not in self.values: - continue + if option["id"] not in self.values: + if option["type"] in ["alert", "display_text", "markdown", "file"]: + continue + else: + raise YunohostError("config_missing_init_value", question=option["id"]) value = self.values[option["name"]] # In general, the value is just a simple value. # Sometimes it could be a dict used to overwrite the option itself