From 773acd79372ac536b2853d73fdf17e7a973e3fdd Mon Sep 17 00:00:00 2001 From: AgAngle <1323481023@qq.com> Date: Tue, 17 Dec 2024 17:36:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=90=8E=E7=BD=AE=E8=84=9A=E6=9C=AC=E4=B8=AD=EF=BC=8C=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=BC=95=E7=94=A8=E5=85=AC=E5=85=B1=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E4=BF=9D=E5=AD=98=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/project/api/assertion/MsScriptAssertion.java | 1 - .../io/metersphere/project/api/processor/ScriptProcessor.java | 1 - .../io/metersphere/project/service/FileAssociationService.java | 3 +++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/api/assertion/MsScriptAssertion.java b/backend/services/project-management/src/main/java/io/metersphere/project/api/assertion/MsScriptAssertion.java index 5668447545..443b4d90b4 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/api/assertion/MsScriptAssertion.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/api/assertion/MsScriptAssertion.java @@ -46,7 +46,6 @@ public class MsScriptAssertion extends MsAssertion { } } - @JsonIgnore public boolean isEnableCommonScript() { return BooleanUtils.isTrue(enableCommonScript); } diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/api/processor/ScriptProcessor.java b/backend/services/project-management/src/main/java/io/metersphere/project/api/processor/ScriptProcessor.java index 4206899fe1..20c0a3e0f2 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/api/processor/ScriptProcessor.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/api/processor/ScriptProcessor.java @@ -54,7 +54,6 @@ public class ScriptProcessor extends MsProcessor { } } - @JsonIgnore public boolean isEnableCommonScript() { return BooleanUtils.isTrue(enableCommonScript); } diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/FileAssociationService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/FileAssociationService.java index e8b5ea1386..e7ea74e0fe 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/FileAssociationService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/FileAssociationService.java @@ -296,6 +296,9 @@ public class FileAssociationService { Map fileIdMap = new HashMap<>(); for (FileAssociation fileAssociation:fileAssociationList){ FileAssociationSource source = extFileAssociationMapper.selectNameBySourceTableAndId(FileAssociationSourceUtil.getQuerySql(fileAssociation.getSourceType()),fileAssociation.getSourceId()); + if (source == null) { + continue; + } this.validateSourceName(source); String fileName = null; if(fileIdMap.containsKey(fileAssociation.getFileId())){