From 527ebec2f55dd8aa39a8e3e3957bd5d6330c663f Mon Sep 17 00:00:00 2001 From: H <43509927+guoyuhao2330@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:04:48 +0800 Subject: [PATCH] Fix Logical operator (#2143) ### What problem does this PR solve? #2120 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- agent/component/switch.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/agent/component/switch.py b/agent/component/switch.py index 72cfaccf2..fe2e2452f 100644 --- a/agent/component/switch.py +++ b/agent/component/switch.py @@ -42,8 +42,6 @@ class SwitchParam(ComponentParamBase): self.check_empty(self.conditions, "[Switch] conditions") for cond in self.conditions: if not cond["to"]: raise ValueError(f"[Switch] 'To' can not be empty!") - if cond["logical_operator"] not in ["and", "or"] and len(cond["items"]) > 1: - raise ValueError(f"[Switch] Please set logical_operator correctly!") class Switch(ComponentBase, ABC):