1
0
forked from test/crm

fix: set options if option is set

This commit is contained in:
Shariq Ansari 2024-01-15 15:01:41 +05:30
parent 0b7f8defec
commit 059c55ca96

View File

@ -234,7 +234,7 @@ def get_field_obj(field):
if field.fieldtype == "Link":
obj["placeholder"] = "Select " + field.label + "..."
obj["doctype"] = field.options
elif field.fieldtype == "Select":
elif field.fieldtype == "Select" and field.options:
obj["options"] = [{"label": option, "value": option} for option in field.options.split("\n")]
if field.read_only: