🐛 fix(base.py): fix variable name in if condition to correctly check field name for 'dict' type handling
This commit is contained in:
parent
5bb661dbb3
commit
ce35caa59f
1 changed files with 1 additions and 1 deletions
|
|
@ -140,7 +140,7 @@ class FrontendNode(BaseModel):
|
|||
@staticmethod
|
||||
def handle_dict_type(field: TemplateField, _type: str) -> str:
|
||||
"""Handles 'dict' type by replacing it with 'code' or 'file' based on the field name."""
|
||||
if "dict" in _type.lower() and key == "dict_":
|
||||
if "dict" in _type.lower() and field.name == "dict_":
|
||||
field.field_type = "file"
|
||||
field.suffixes = [".json", ".yaml", ".yml"]
|
||||
field.file_types = ["json", "yaml", "yml"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue