From e8c844a75fdf68b7d32c7ca616ea90726be33a31 Mon Sep 17 00:00:00 2001 From: gustavoschaedler Date: Wed, 12 Jul 2023 21:54:15 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(types.py):=20handle=20case?= =?UTF-8?q?=20when=20field=5Ftype=20is=20None=20by=20assigning=20an=20empt?= =?UTF-8?q?y=20string=20to=20improve=20code=20robustness=20=F0=9F=90=9B=20?= =?UTF-8?q?fix(types.py):=20reformat=20detail=20dictionary=20in=20raise=20?= =?UTF-8?q?HTTPException=20to=20improve=20readability?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/interface/types.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/langflow/interface/types.py b/src/backend/langflow/interface/types.py index 08bfe77c7..41343089c 100644 --- a/src/backend/langflow/interface/types.py +++ b/src/backend/langflow/interface/types.py @@ -177,6 +177,9 @@ def build_langchain_template_custom_component(extractor: CustomComponent): field_required = True field_name, field_type, field_value = extra_field + if not field_type: + field_type = "" + if field_name != "self": # TODO: Validate type - if is possible to render into frontend if "optional" in field_type.lower():