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

This commit is contained in:
axolotle 2023-04-28 16:11:38 +02:00
parent 6953a8bf15
commit ef860ee6ee

View file

@ -1309,7 +1309,7 @@ class OptionsModel(BaseModel):
option
| {
"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),
}
for id_, option in options.items()