From b25098e24be61856c9dcfd3b9772bf7f986197c3 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Fri, 4 Aug 2023 11:10:29 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(custom=5Fcomponent.py):=20ha?= =?UTF-8?q?ndle=20case=20when=20repr=5Fvalue=20is=20a=20string=20in=20cust?= =?UTF-8?q?om=5Frepr=20method?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/interface/custom/custom_component.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backend/langflow/interface/custom/custom_component.py b/src/backend/langflow/interface/custom/custom_component.py index b1d7a5e76..200625be5 100644 --- a/src/backend/langflow/interface/custom/custom_component.py +++ b/src/backend/langflow/interface/custom/custom_component.py @@ -24,6 +24,8 @@ class CustomComponent(Component, extra=Extra.allow): super().__init__(**data) def custom_repr(self): + if isinstance(self.repr_value, str): + return self.repr_value return str(self.repr_value) def build_config(self):