fix(api):Fix the issue of empty and not empty operations failing in k… (#24276)

Co-authored-by: liumin <min.liu@tongdun.net>
This commit is contained in:
Amy
2025-08-21 14:43:08 +08:00
committed by GitHub
parent 5867e6356d
commit 738aaee101
2 changed files with 2 additions and 2 deletions

View File

@@ -1012,7 +1012,7 @@ class DatasetRetrieval:
def _process_metadata_filter_func(
self, sequence: int, condition: str, metadata_name: str, value: Optional[Any], filters: list
):
if value is None:
if value is None and condition not in ("empty", "not empty"):
return
key = f"{metadata_name}_{sequence}"

View File

@@ -572,7 +572,7 @@ class KnowledgeRetrievalNode(BaseNode):
def _process_metadata_filter_func(
self, sequence: int, condition: str, metadata_name: str, value: Optional[Any], filters: list
):
if value is None:
if value is None and condition not in ("empty", "not empty"):
return
key = f"{metadata_name}_{sequence}"