fix: avoid none values
(cherry picked from commit d2d4abe91f848f100f5885ce9dfb09533b1a0df8)
This commit is contained in:
parent
5962f2477f
commit
09c016c40e
@ -47,7 +47,9 @@ def get_fields_layout(doctype: str, type: str, parent_doctype: str | None = None
|
|||||||
|
|
||||||
for tab in tabs:
|
for tab in tabs:
|
||||||
for section in tab.get("sections"):
|
for section in tab.get("sections"):
|
||||||
|
section["columns"] = [column for column in section.get("columns") if column]
|
||||||
for column in section.get("columns") if section.get("columns") else []:
|
for column in section.get("columns") if section.get("columns") else []:
|
||||||
|
column["fields"] = [field for field in column.get("fields") if field]
|
||||||
for field in column.get("fields") if column.get("fields") else []:
|
for field in column.get("fields") if column.get("fields") else []:
|
||||||
field = next((f for f in fields if f.fieldname == field), None)
|
field = next((f for f in fields if f.fieldname == field), None)
|
||||||
if field:
|
if field:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user