mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
be more specific for error message (#1409)
### What problem does this PR solve? #918 ### Type of change - [x] Refactoring
This commit is contained in:
@ -44,8 +44,10 @@ class SwitchParam(ComponentParamBase):
|
||||
self.default = ""
|
||||
|
||||
def check(self):
|
||||
self.check_empty(self.conditions, "Switch conditions")
|
||||
self.check_empty(self.default, "Default path")
|
||||
self.check_empty(self.conditions, "[Switch] conditions")
|
||||
self.check_empty(self.default, "[Switch] Default path")
|
||||
for cond in self.conditions:
|
||||
if not cond["to"]: raise ValueError(f"[Switch] 'To' can not be empty!")
|
||||
|
||||
def operators(self, field, op, value):
|
||||
if op == "gt":
|
||||
|
||||
Reference in New Issue
Block a user