From 9b898a035126c0ce650b64af5d0af63f4366df64 Mon Sep 17 00:00:00 2001 From: Edwin Jose Date: Fri, 1 Nov 2024 04:39:08 -0400 Subject: [PATCH] fix-base-component-set-method (#4347) Update component.py Updated `_process_connection_or_parameters` to handle lists of components more robustly, ensuring it excludes lists containing `Message` or `Data` types. --- .../base/langflow/custom/custom_component/component.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backend/base/langflow/custom/custom_component/component.py b/src/backend/base/langflow/custom/custom_component/component.py index cc4d64e9d..2a4c73f80 100644 --- a/src/backend/base/langflow/custom/custom_component/component.py +++ b/src/backend/base/langflow/custom/custom_component/component.py @@ -444,7 +444,9 @@ class Component(CustomComponent): def _process_connection_or_parameters(self, key, value) -> None: # if value is a list of components, we need to process each component # Note this update make sure it is not a list str | int | float | bool | type(None) - if isinstance(value, list) and not any(isinstance(val, str | int | float | bool | type(None)) for val in value): + if isinstance(value, list) and not any( + isinstance(val, str | int | float | bool | type(None) | Message | Data) for val in value + ): for val in value: self._process_connection_or_parameter(key, val) else: