From ce34bb75c49fbe9ded178c94a63e1715800277c2 Mon Sep 17 00:00:00 2001 From: ljf Date: Mon, 13 Sep 2021 00:47:21 +0200 Subject: [PATCH] [enh] Avoid to raise error with bin null and empty value --- src/yunohost/utils/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/yunohost/utils/config.py b/src/yunohost/utils/config.py index e0b893356..6cc693740 100644 --- a/src/yunohost/utils/config.py +++ b/src/yunohost/utils/config.py @@ -280,7 +280,8 @@ class ConfigPanel: logger.debug("Hydrating config with current values") for _, _, option in self._iterate(): if option["id"] not in self.values: - if option["type"] in ["alert", "display_text", "markdown", "file"]: + allowed_empty_types = ["alert", "display_text", "markdown", "file"] + if option["type"] in allowed_empty_type or option["bind"] == "null": continue else: raise YunohostError("config_missing_init_value", question=option["id"])