From 443ef43c54f26e72fb1e2fa70be7957d9d86c492 Mon Sep 17 00:00:00 2001 From: dizhongzhu Date: Fri, 23 Aug 2024 10:18:04 +0100 Subject: [PATCH] Do not pass query parameter when the value is empty --- api/core/tools/tool/api_tool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/tools/tool/api_tool.py b/api/core/tools/tool/api_tool.py index 69e3dfa0612e8a..38f10032e2282b 100644 --- a/api/core/tools/tool/api_tool.py +++ b/api/core/tools/tool/api_tool.py @@ -144,7 +144,7 @@ def do_http_request(self, url: str, method: str, headers: dict[str, Any], path_params[parameter['name']] = value elif parameter['in'] == 'query': - params[parameter['name']] = value + if value !='': params[parameter['name']] = value elif parameter['in'] == 'cookie': cookies[parameter['name']] = value