🐛 fix(custom_component.py): handle case when return_type is None to prevent errors
🐛 fix(test_custom_component.py): update assertion to expect return_type as a list instead of a string 🐛 fix(test_vectorstore_template.py): update assertion to check if all vectorstores in settings are present in the response
This commit is contained in:
parent
30aad35cc6
commit
8c41415a32
3 changed files with 7 additions and 4 deletions
|
|
@ -118,6 +118,8 @@ class CustomComponent(Component, extra=Extra.allow):
|
|||
|
||||
build_method = build_methods[0]
|
||||
return_type = build_method["return_type"]
|
||||
if not return_type:
|
||||
return []
|
||||
# If the return type is not a Union, then we just return it as a list
|
||||
if "Union" not in return_type:
|
||||
return [return_type] if return_type in self.return_type_valid_list else []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue