mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
form+configpanel: reflect Section optional
value to all its Options
This commit is contained in:
parent
fccb291d78
commit
48f882ecd3
2 changed files with 3 additions and 3 deletions
|
@ -95,9 +95,10 @@ class SectionModel(ContainerModel, OptionsModel):
|
|||
services: list[str] = [],
|
||||
help: Union[Translation, None] = None,
|
||||
visible: Union[bool, str] = True,
|
||||
optional: bool = True,
|
||||
**kwargs,
|
||||
) -> None:
|
||||
options = self.options_dict_to_list(kwargs, optional=True)
|
||||
options = self.options_dict_to_list(kwargs, optional=optional)
|
||||
|
||||
ContainerModel.__init__(
|
||||
self,
|
||||
|
|
|
@ -1308,9 +1308,8 @@ class OptionsModel(BaseModel):
|
|||
return [
|
||||
option
|
||||
| {
|
||||
"id": id_,
|
||||
"id": option.get("id", id_),
|
||||
"type": option.get("type", "string"),
|
||||
# ConfigPanel options needs to be set as optional by default
|
||||
"optional": option.get("optional", optional),
|
||||
}
|
||||
for id_, option in options.items()
|
||||
|
|
Loading…
Add table
Reference in a new issue