From 3c3c3033278451b69d77746ec235036536e1a37a Mon Sep 17 00:00:00 2001 From: axolotle Date: Fri, 28 Apr 2023 16:11:38 +0200 Subject: [PATCH] form: default type to "select" if choices in option --- src/utils/form.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/form.py b/src/utils/form.py index ca0f7612f..6a80f214a 100644 --- a/src/utils/form.py +++ b/src/utils/form.py @@ -1304,7 +1304,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()