[enh] Avoid to raise error with bin null and empty value

This commit is contained in:
ljf 2021-09-13 00:47:21 +02:00
parent 2710ca7271
commit ce34bb75c4

View file

@ -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"])