diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportService.java index 4b326a788c..2e185fbe0f 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioReportService.java @@ -861,9 +861,9 @@ public class ApiScenarioReportService { private Map extractScenarioEnv(String envType, String envJson, String envGroupId) { Map scenarioEnv = new LinkedHashMap<>(); - if (envType.equals(EnvironmentType.JSON.name()) && StringUtils.isNotBlank(envJson)) { + if (StringUtils.equals(envType, EnvironmentType.JSON.name()) && StringUtils.isNotBlank(envJson)) { scenarioEnv = JSON.parseObject(envJson, Map.class); - } else if (envType.equals(EnvironmentType.GROUP.name()) && StringUtils.isNotBlank(envGroupId)) { + } else if (StringUtils.equals(envType, EnvironmentType.GROUP.name()) && StringUtils.isNotBlank(envGroupId)) { scenarioEnv = environmentGroupProjectService.getEnvMap(envGroupId); } return scenarioEnv;