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.
This commit is contained in:
parent
794848d5e9
commit
9b898a0351
1 changed files with 3 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue