diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/MdFileService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/MdFileService.java index c6f0593b17..2fab6a81f1 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/MdFileService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/MdFileService.java @@ -194,6 +194,9 @@ public class MdFileService { * @param resourceIds */ public void deleteBySourceIds(List resourceIds) { + if (CollectionUtils.isEmpty(resourceIds)) { + return; + } // 查询文件是否被其他资源引用 List deleteFileAssociations = fileAssociationService.getByResourceIds(resourceIds); List fileNames = deleteFileAssociations.stream().map(FileAssociation::getFileMetadataId).toList();