From 4bca4fd894150e509d9784a1357a7c9253067051 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Fri, 16 Feb 2024 10:48:37 -0300 Subject: [PATCH] Add check for None value in template_config assignment --- .../langflow/interface/custom/custom_component/component.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/langflow/interface/custom/custom_component/component.py b/src/backend/langflow/interface/custom/custom_component/component.py index 087ecfa56..3af7acea5 100644 --- a/src/backend/langflow/interface/custom/custom_component/component.py +++ b/src/backend/langflow/interface/custom/custom_component/component.py @@ -87,7 +87,8 @@ class Component: for attribute, func in attributes_func_mapping.items(): if hasattr(component_instance, attribute): value = getattr(component_instance, attribute) - template_config[attribute] = func(value=value) + if value is not None: + template_config[attribute] = func(value=value) return template_config