From 059c55ca9619459d1adc4ca2a94e37e9a215fd6a Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 15 Jan 2024 15:01:41 +0530 Subject: [PATCH] fix: set options if option is set --- crm/api/doc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crm/api/doc.py b/crm/api/doc.py index 74405caa..a62c6881 100644 --- a/crm/api/doc.py +++ b/crm/api/doc.py @@ -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: