From 0abfe4353373f905a8695cac4c08af90f640180b Mon Sep 17 00:00:00 2001 From: italojohnny Date: Mon, 24 Jun 2024 18:37:31 -0300 Subject: [PATCH] fix condition stop --- .../base/langflow/custom/custom_component/custom_component.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/base/langflow/custom/custom_component/custom_component.py b/src/backend/base/langflow/custom/custom_component/custom_component.py index 5505ae1325e8..24df42894def 100644 --- a/src/backend/base/langflow/custom/custom_component/custom_component.py +++ b/src/backend/base/langflow/custom/custom_component/custom_component.py @@ -96,7 +96,7 @@ def update_state(self, name: str, value: Any): def stop(self, output_name: str | None = None): if not output_name and self.vertex and len(self.vertex.outputs) == 1: output_name = self.vertex.outputs[0]["name"] - else: + elif not output_name: raise ValueError("You must specify an output name to call stop") if not self.vertex: raise ValueError("Vertex is not set")