fix(UI 自动化): 修复测试计划导出报告报错

This commit is contained in:
zhangdahai112 2022-08-25 18:37:39 +08:00 committed by zhangdahai112
parent 3b3544aa2f
commit 482165ccf7

View File

@ -1604,7 +1604,11 @@ public class TestPlanService {
if (resultMap.get(item.getReportId()) != null &&
StringUtils.isNotBlank(resultMap.get(item.getReportId()).getContent())) {
ApiDefinitionExecResultWithBLOBs execResult = resultMap.get(item.getReportId());
JSONObject responseObj = JSONObject.parseObject(execResult.getContent());
JSONObject responseObj = new JSONObject();
try {
responseObj = JSONObject.parseObject(execResult.getContent());
} catch (Exception e) {
}
if (StringUtils.isNotEmpty(execResult.getEnvConfig())) {
responseObj.put("envName", apiDefinitionService.getEnvNameByEnvConfig(execResult.getProjectId(), execResult.getEnvConfig()));
}