H
commited on
Commit
·
864d034
1
Parent(s):
13b285d
Fix Logical operator (#2143)
Browse files### What problem does this PR solve?
#2120
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
agent/component/switch.py
CHANGED
|
@@ -42,8 +42,6 @@ class SwitchParam(ComponentParamBase):
|
|
| 42 |
self.check_empty(self.conditions, "[Switch] conditions")
|
| 43 |
for cond in self.conditions:
|
| 44 |
if not cond["to"]: raise ValueError(f"[Switch] 'To' can not be empty!")
|
| 45 |
-
if cond["logical_operator"] not in ["and", "or"] and len(cond["items"]) > 1:
|
| 46 |
-
raise ValueError(f"[Switch] Please set logical_operator correctly!")
|
| 47 |
|
| 48 |
|
| 49 |
class Switch(ComponentBase, ABC):
|
|
|
|
| 42 |
self.check_empty(self.conditions, "[Switch] conditions")
|
| 43 |
for cond in self.conditions:
|
| 44 |
if not cond["to"]: raise ValueError(f"[Switch] 'To' can not be empty!")
|
|
|
|
|
|
|
| 45 |
|
| 46 |
|
| 47 |
class Switch(ComponentBase, ABC):
|