diff --git a/backend/src/main/java/io/metersphere/performance/service/PerformanceReportService.java b/backend/src/main/java/io/metersphere/performance/service/PerformanceReportService.java index 0d50d58beb..6955c725db 100644 --- a/backend/src/main/java/io/metersphere/performance/service/PerformanceReportService.java +++ b/backend/src/main/java/io/metersphere/performance/service/PerformanceReportService.java @@ -345,14 +345,10 @@ public class PerformanceReportService { public String getPoolTypeByReportId(String reportId) { LoadTestReportWithBLOBs report = getReport(reportId); - String testId = report.getTestId(); - LoadTestWithBLOBs test = loadTestMapper.selectByPrimaryKey(testId); - if (test != null) { - String poolId = test.getTestResourcePoolId(); - TestResourcePool testResourcePool = testResourcePoolMapper.selectByPrimaryKey(poolId); - if (testResourcePool != null) { - return testResourcePool.getType(); - } + String poolId = report.getTestResourcePoolId(); + TestResourcePool testResourcePool = testResourcePoolMapper.selectByPrimaryKey(poolId); + if (testResourcePool != null) { + return testResourcePool.getType(); } return ""; }