Fix: prevent SQL errors when metadata filter Constant value is None or blank (#21803)
This commit is contained in:
parent
89250a36b7
commit
826bf25abf
2 changed files with 6 additions and 0 deletions
|
|
@ -1010,6 +1010,9 @@ class DatasetRetrieval:
|
|||
def _process_metadata_filter_func(
|
||||
self, sequence: int, condition: str, metadata_name: str, value: Optional[Any], filters: list
|
||||
):
|
||||
if value is None:
|
||||
return
|
||||
|
||||
key = f"{metadata_name}_{sequence}"
|
||||
key_value = f"{metadata_name}_{sequence}_value"
|
||||
match condition:
|
||||
|
|
|
|||
|
|
@ -490,6 +490,9 @@ class KnowledgeRetrievalNode(LLMNode):
|
|||
def _process_metadata_filter_func(
|
||||
self, sequence: int, condition: str, metadata_name: str, value: Optional[Any], filters: list
|
||||
):
|
||||
if value is None:
|
||||
return
|
||||
|
||||
key = f"{metadata_name}_{sequence}"
|
||||
key_value = f"{metadata_name}_{sequence}_value"
|
||||
match condition:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue