提交 70e12a5d 编写于 作者: 泰斯特Test's avatar 泰斯特Test

[fix](backend/utils/common) 修复字典中存在json字符串时的转化问题

上级 e3b93ad3
......@@ -452,7 +452,7 @@ def validate_and_pre_process_import_test_case(case_suite_model, testing_case_mod
list(map(lambda x: ast.literal_eval(x.replace('\'', '\"')),
str(_case_info[key]).strip().split(';')))
elif attribute_type is dict:
_case_info[key] = ast.literal_eval(str(_case_info[key]).strip().replace('\'', '\"')) \
_case_info[key] = ast.literal_eval(str(_case_info[key]).strip()) \
if _case_info[key] else {}
elif attribute_type is bool:
_case_info[key] = True if str(_case_info[key]).strip().lower() == 'true' else False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册