config: bind key may not exist in option

This commit is contained in:
Alexandre Aubin 2021-09-13 01:50:04 +02:00
parent 3df362e921
commit 380321a6eb

View file

@ -282,7 +282,7 @@ class ConfigPanel:
for _, _, option in self._iterate():
if option["id"] not in self.values:
allowed_empty_types = ["alert", "display_text", "markdown", "file"]
if option["type"] in allowed_empty_types or option["bind"] == "null":
if option["type"] in allowed_empty_types or option.get("bind") == "null":
continue
else:
raise YunohostError(f"Config panel question '{option['id']}' should be initialized with a value during install or upgrade.")