Skip to content

Commit 7f32583

Browse files
Changed Rootmodel for GuiComponents
1 parent 798978c commit 7f32583

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/techui_builder/generate.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,7 @@ def _create_widget(
296296
return None
297297

298298
if self._is_dict_of_dicts(scrn_mapping):
299-
for key, value in scrn_mapping.items():
300-
LOGGER.debug(f"235:{key}")
301-
LOGGER.debug(f"236:{value['type']}")
299+
for _, value in scrn_mapping.items():
302300
new_widget.append(self._allocate_widget(support_path, value, component))
303301
else:
304302
new_widget = self._allocate_widget(support_path, scrn_mapping, component)

src/techui_builder/models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ class GuiComponentEntry(BaseModel):
151151
model_config = ConfigDict(extra="forbid")
152152

153153

154-
class GuiComponents(RootModel[dict[str, GuiComponentEntry]]):
154+
class GuiComponents(
155+
RootModel[dict[str, dict[str, GuiComponentEntry]] | dict[str, GuiComponentEntry]]
156+
):
155157
pass
156158

157159

0 commit comments

Comments
 (0)