diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/DemandSyncService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/DemandSyncService.java index 6941360972..b543662895 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/DemandSyncService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/DemandSyncService.java @@ -97,10 +97,12 @@ public class DemandSyncService { demandRelateQueryRequest.setRelateDemandIds(new ArrayList<>(demandIds)); PlatformDemandDTO demands = platform.getDemands(demandRelateQueryRequest); if (demands == null) { + deleteIds.addAll(demandIds); return; } List demandList = demands.getList(); if (CollectionUtils.isEmpty(demandList)) { + deleteIds.addAll(demandIds); return; } List platformIds = demandList.stream().map(PlatformDemandDTO.Demand::getDemandId).toList();