diff --git a/backend/src/main/java/io/metersphere/track/service/TestPlanScenarioCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestPlanScenarioCaseService.java index b9e0056181..21684b0fe7 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestPlanScenarioCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestPlanScenarioCaseService.java @@ -214,6 +214,7 @@ public class TestPlanScenarioCaseService { } public void setScenarioEnv(List planScenarioIds, RunModeConfigDTO runModeConfig) { + if (CollectionUtils.isEmpty(planScenarioIds)) return; SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH); TestPlanApiScenarioExample testPlanApiScenarioExample = new TestPlanApiScenarioExample(); testPlanApiScenarioExample.createCriteria().andIdIn(planScenarioIds);