From 7f48acb3fd8a8d8841d57a262841f9a5d5bf7f36 Mon Sep 17 00:00:00 2001 From: liuhua <10215101452@stu.ecnu.edu.cn> Date: Wed, 27 Nov 2024 09:37:11 +0800 Subject: [PATCH] Fix enable/disable bug (#3662) ### What problem does this PR solve? Fix enable/disable bug #3628 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --------- Co-authored-by: liuhua <10215101452@stu.ecun.edu.cn> Co-authored-by: Kevin Hu --- rag/utils/es_conn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rag/utils/es_conn.py b/rag/utils/es_conn.py index a5b266b8..2e2d7f4a 100644 --- a/rag/utils/es_conn.py +++ b/rag/utils/es_conn.py @@ -294,7 +294,7 @@ class ESConnection(DocStoreConnection): f"Condition `{str(k)}={str(v)}` value type is {str(type(v))}, expected to be int, str or list.") scripts = [] for k, v in newValue.items(): - if not isinstance(k, str) or not v: + if (not isinstance(k, str) or not v) and k != "available_int": continue if isinstance(v, str): scripts.append(f"ctx._source.{k} = '{v}'")