From 95209738b00d0fab131213dee29e3d20cc30af9d Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Fri, 20 Sep 2024 14:53:06 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86):?= =?UTF-8?q?=20=E4=BC=98=E5=8C=96=E5=AF=8C=E6=96=87=E6=9C=AC=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/metersphere/bug/service/BugService.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugService.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugService.java index 6fe33201e8..26089c320e 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugService.java +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/service/BugService.java @@ -1374,10 +1374,9 @@ public class BugService { * @param request 请求参数 */ private void filterRichTextTmpFile(BugEditRequest request) { - // 项目模板带过来的图片文件不处理 + // 非缺陷来源的图片过滤不处理 if (CollectionUtils.isNotEmpty(request.getRichTextTmpFileIds())) { - request.getRichTextTmpFileIds().removeIf(tmpFileId -> request.getDescription().contains("/project/template/img/preview/" + request.getProjectId() + "/" + tmpFileId) || - request.getDescription().contains("/attachment/download/file/" + request.getProjectId() + "/" + tmpFileId)); + request.getRichTextTmpFileIds().removeIf(tmpFileId -> !request.getDescription().contains("/bug/attachment/preview/md/" + request.getProjectId() + "/" + tmpFileId)); } }