diff --git a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java index df4ee43776..7b88f07940 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java @@ -1013,6 +1013,7 @@ public class ApiAutomationService { isEnv = false; } else { Set projectIds = apiScenarioEnv.getProjectIds(); + projectIds.remove(null); if (CollectionUtils.isNotEmpty(envMap.keySet())) { for (String id : projectIds) { Project project = projectMapper.selectByPrimaryKey(id);