diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java index a6963d2935..ee006c496e 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java @@ -321,6 +321,9 @@ public class TestPlanApiCaseService extends TestPlanResourceService { public Map moduleCount(TestPlanApiCaseModuleRequest request) { + if (CollectionUtils.isEmpty(request.getProtocols())) { + return Collections.emptyMap(); + } switch (request.getTreeType()) { case TreeTypeEnums.MODULE: return getModuleCount(request);