diff --git a/api-test/backend/src/main/java/io/metersphere/service/plan/TestPlanScenarioCaseService.java b/api-test/backend/src/main/java/io/metersphere/service/plan/TestPlanScenarioCaseService.java index e87b11d604..64d4e84ec8 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/plan/TestPlanScenarioCaseService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/plan/TestPlanScenarioCaseService.java @@ -248,6 +248,7 @@ public class TestPlanScenarioCaseService { testPlanApiScenario.setTestPlanId(request.getPlanId()); testPlanApiScenario.setCreateTime(System.currentTimeMillis()); testPlanApiScenario.setUpdateTime(System.currentTimeMillis()); + newEnvMap.remove(null); String environmentJson = JSON.toJSONString(newEnvMap); if (StringUtils.equals(envType, EnvironmentType.JSON.name())) { testPlanApiScenario.setEnvironment(environmentJson);