form: default type to "select" if choices in option

This commit is contained in:
axolotle 2023-04-28 16:11:38 +02:00
parent 283c32dbf2
commit 3c3c303327

View file

@ -1304,7 +1304,7 @@ class OptionsModel(BaseModel):
option option
| { | {
"id": option.get("id", id_), "id": option.get("id", id_),
"type": option.get("type", "string"), "type": option.get("type", "select" if "choices" in option else "string"),
"optional": option.get("optional", optional), "optional": option.get("optional", optional),
} }
for id_, option in options.items() for id_, option in options.items()