mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 04:45:52 +08:00
Fix Logical operator (#2143)
### What problem does this PR solve? #2120 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
a0b7c78dca
commit
527ebec2f5
@ -42,8 +42,6 @@ class SwitchParam(ComponentParamBase):
|
|||||||
self.check_empty(self.conditions, "[Switch] conditions")
|
self.check_empty(self.conditions, "[Switch] conditions")
|
||||||
for cond in self.conditions:
|
for cond in self.conditions:
|
||||||
if not cond["to"]: raise ValueError(f"[Switch] 'To' can not be empty!")
|
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):
|
class Switch(ComponentBase, ABC):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user