Skip to content

Commit

Permalink
refactor: refactor metadata generator
Browse files Browse the repository at this point in the history
Signed-off-by: Jongmin Kim <[email protected]>
  • Loading branch information
whdalsrnt committed Jun 16, 2024
1 parent 12e8d8f commit b8705a2
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,15 @@ def _generate_tabs(self, tabs_meta: list) -> dict:
new_tabs_metadata.append(dynamic_view)

# generate single dynamic view
elif "fields" in tab_meta:
else:
dynamic_view = self._generate_default_dynamic_view(
name=tab_meta["name"], view_type=tab_meta["type"]
)

dynamic_view["options"]["fields"] = self._generate_fields(
tab_meta["fields"]
)
if "fields" in tab_meta:
dynamic_view["options"]["fields"] = self._generate_fields(
tab_meta["fields"]
)

if "root_path" in tab_meta:
dynamic_view["options"]["root_path"] = tab_meta["root_path"]
Expand Down Expand Up @@ -436,6 +437,10 @@ def _generate_enum_field(self, field: dict) -> dict:
enums[main_key]["name"] = enum["name"]
del enum["name"]

if "label" in enum:
enums[main_key]["label"] = enum["label"]
del enum["label"]

if "options" in field:
field["options"].update(enums)
else:
Expand Down

0 comments on commit b8705a2

Please sign in to comment.