mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Raise an error if question has not been initialize
This commit is contained in:
parent
518d41f6a9
commit
f8fed701b9
1 changed files with 5 additions and 2 deletions
|
@ -279,8 +279,11 @@ class ConfigPanel:
|
||||||
# Hydrating config panel with current value
|
# Hydrating config panel with current value
|
||||||
logger.debug("Hydrating config with current values")
|
logger.debug("Hydrating config with current values")
|
||||||
for _, _, option in self._iterate():
|
for _, _, option in self._iterate():
|
||||||
if option["name"] not in self.values:
|
if option["id"] not in self.values:
|
||||||
|
if option["type"] in ["alert", "display_text", "markdown", "file"]:
|
||||||
continue
|
continue
|
||||||
|
else:
|
||||||
|
raise YunohostError("config_missing_init_value", question=option["id"])
|
||||||
value = self.values[option["name"]]
|
value = self.values[option["name"]]
|
||||||
# In general, the value is just a simple value.
|
# In general, the value is just a simple value.
|
||||||
# Sometimes it could be a dict used to overwrite the option itself
|
# Sometimes it could be a dict used to overwrite the option itself
|
||||||
|
|
Loading…
Add table
Reference in a new issue