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())){