From 28231d39a4a10b0df1337c0620b6c2d46ae9dac8 Mon Sep 17 00:00:00 2001 From: Wei Mingzhi Date: Tue, 10 Dec 2024 19:53:38 +0800 Subject: [PATCH] Remove the processing of single quote when testing API tools. (#11390) --- api/core/tools/tool/api_tool.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/api/core/tools/tool/api_tool.py b/api/core/tools/tool/api_tool.py index 0b4c5bd2c6fd73..636debffd46f05 100644 --- a/api/core/tools/tool/api_tool.py +++ b/api/core/tools/tool/api_tool.py @@ -270,9 +270,6 @@ def _convert_body_property_type(self, property: dict[str, Any], value: Any) -> A elif property["type"] == "object" or property["type"] == "array": if isinstance(value, str): try: - # an array str like '[1,2]' also can convert to list [1,2] through json.loads - # json not support single quote, but we can support it - value = value.replace("'", '"') return json.loads(value) except ValueError: return value