From 8584d4b642f8c14527931a4633cb758effd92b6f Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Wed, 5 Nov 2025 15:14:30 +0800 Subject: [PATCH] Fix: numeric string miss transformation. (#11025) ### What problem does this PR solve? #11024 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- api/db/services/dialog_service.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/api/db/services/dialog_service.py b/api/db/services/dialog_service.py index 6e5bab0da..4d4776050 100644 --- a/api/db/services/dialog_service.py +++ b/api/db/services/dialog_service.py @@ -294,12 +294,13 @@ def meta_filter(metas: dict, filters: list[dict]): def filter_out(v2docs, operator, value): ids = [] for input, docids in v2docs.items(): - try: - input = float(input) - value = float(value) - except Exception: - input = str(input) - value = str(value) + if operator in ["=", "≠", ">", "<", "≥", "≤"]: + try: + input = float(input) + value = float(value) + except Exception: + input = str(input) + value = str(value) for conds in [ (operator == "contains", str(value).lower() in str(input).lower()),