From 69b756c35b6e798d740adddfdba4eb2f5a0fbf76 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Sat, 22 Jun 2024 18:00:46 -0300 Subject: [PATCH] refactor: Update build_custom_component_template return type Update the return type of the build_custom_component_template function in utils.py to include the possibility of returning a Component object. This change ensures that the function can handle both CustomComponent and Component objects, improving flexibility and compatibility. --- src/backend/base/langflow/custom/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/base/langflow/custom/utils.py b/src/backend/base/langflow/custom/utils.py index f15762b99..4dd96f1c2 100644 --- a/src/backend/base/langflow/custom/utils.py +++ b/src/backend/base/langflow/custom/utils.py @@ -385,7 +385,7 @@ def build_custom_component_template_from_inputs( def build_custom_component_template( custom_component: CustomComponent, user_id: Optional[Union[str, UUID]] = None, -) -> Tuple[Dict[str, Any], CustomComponent]: +) -> Tuple[Dict[str, Any], CustomComponent | Component]: """Build a custom component template""" try: if "inputs" in custom_component.template_config: