diff --git a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/inner/impl/ServiceApplicationResourceImpl.java b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/inner/impl/ServiceApplicationResourceImpl.java index 02ca3b365f..d7ae084df2 100644 --- a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/inner/impl/ServiceApplicationResourceImpl.java +++ b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/inner/impl/ServiceApplicationResourceImpl.java @@ -151,8 +151,11 @@ public InternalResponse> listApps(String scopeType) InternalResponse.buildSuccessResp(appList); } - appList = appList.stream().filter(app -> app.getScope().getType() == ResourceScopeTypeEnum.from(scopeType)) - .collect(Collectors.toList()); + if (scopeType != null) { + appList = appList.stream() + .filter(app -> app.getScope().getType() == ResourceScopeTypeEnum.from(scopeType)) + .collect(Collectors.toList()); + } List resultList = appList.stream().map(this::convertToServiceApp).collect(Collectors.toList());