From 354a236bc782dbb303fd4fa51376c79c60dbfc4d Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 2 May 2024 18:32:13 -0300 Subject: [PATCH] Fix custom_repr assignment in instantiate_custom_component function (#1828) --- src/backend/base/langflow/interface/initialize/loading.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/base/langflow/interface/initialize/loading.py b/src/backend/base/langflow/interface/initialize/loading.py index 15045cd06..fcec59cae 100644 --- a/src/backend/base/langflow/interface/initialize/loading.py +++ b/src/backend/base/langflow/interface/initialize/loading.py @@ -185,7 +185,7 @@ async def instantiate_custom_component(params, user_id, vertex): # Call the build method directly if it's sync build_result = custom_component.build(**params_copy) custom_repr = custom_component.custom_repr() - if not custom_repr and isinstance(build_result, (dict, Record, str)): + if custom_repr is None and isinstance(build_result, (dict, Record, str)): custom_repr = build_result if not isinstance(custom_repr, str): custom_repr = str(custom_repr)