fix: do not get default layout if type is Required Fields

This commit is contained in:
Shariq Ansari 2025-02-21 14:44:33 +05:30
parent 55a4b9b3e3
commit ec6a1f84eb

View File

@ -24,7 +24,7 @@ def get_fields_layout(doctype: str, type: str, parent_doctype: str | None = None
if layout and layout.layout:
tabs = json.loads(layout.layout)
if not tabs:
if not tabs and type != "Required Fields":
tabs = get_default_layout(doctype)
has_tabs = tabs[0].get("sections") if tabs and tabs[0] else False