Skip to content

Commit

Permalink
Fix Logical operator (#2143)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

#2120 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
guoyuhao2330 authored Aug 28, 2024
1 parent a0b7c78 commit 527ebec
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions agent/component/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ def check(self):
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):
Expand Down

0 comments on commit 527ebec

Please sign in to comment.