瀏覽代碼

Remove the processing of single quote when testing API tools. (#11390)

tags/0.14.0
Wei Mingzhi 10 月之前
父節點
當前提交
28231d39a4
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 0 行新增3 行删除
  1. 0
    3
      api/core/tools/tool/api_tool.py

+ 0
- 3
api/core/tools/tool/api_tool.py 查看文件

elif property["type"] == "object" or property["type"] == "array": elif property["type"] == "object" or property["type"] == "array":
if isinstance(value, str): if isinstance(value, str):
try: 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) return json.loads(value)
except ValueError: except ValueError:
return value return value

Loading…
取消
儲存