From 9b39bfadc9391c18933fe2fe65a88496bc991bf8 Mon Sep 17 00:00:00 2001 From: AgAngle <1323481023@qq.com> Date: Wed, 25 Oct 2023 18:22:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=9B=9E=E6=94=B6=E7=AB=99=E5=88=A0=E9=99=A4=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/metersphere/service/MdFileService.java | 3 +++ 1 file changed, 3 insertions(+) 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();