diff --git a/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportService.java b/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportService.java index b5e715df5c..78b33db56b 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiScenarioReportService.java @@ -191,8 +191,10 @@ public class ApiScenarioReportService { startTime = scenarioResult.getRequestResults().get(0).getStartTime(); } ApiScenarioReport report = editReport(scenarioResult, startTime); - report.setTriggerMode(ReportTriggerMode.CASE.name()); - apiScenarioReportMapper.updateByPrimaryKeySelective(report); + if (!StringUtils.equals(ReportTriggerMode.API.name(), report.getTriggerMode())) { + report.setTriggerMode(ReportTriggerMode.CASE.name()); + apiScenarioReportMapper.updateByPrimaryKeySelective(report); + } // 报告详情内容 ApiScenarioReportDetail detail = new ApiScenarioReportDetail();