From ce35caa59f021880a08923a496c26ad4484f2ac4 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 19 Sep 2023 15:11:36 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(base.py):=20fix=20variable?= =?UTF-8?q?=20name=20in=20if=20condition=20to=20correctly=20check=20field?= =?UTF-8?q?=20name=20for=20'dict'=20type=20handling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/template/frontend_node/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/langflow/template/frontend_node/base.py b/src/backend/langflow/template/frontend_node/base.py index 979054c9b..442e2ffd7 100644 --- a/src/backend/langflow/template/frontend_node/base.py +++ b/src/backend/langflow/template/frontend_node/base.py @@ -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"]