diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/processor/ScriptProcessorConverter.java b/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/processor/ScriptProcessorConverter.java index 304127aef4..fafaf3a660 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/processor/ScriptProcessorConverter.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/parser/jmeter/processor/ScriptProcessorConverter.java @@ -53,7 +53,7 @@ public abstract class ScriptProcessorConverter extends MsProcessorConverter 0) { throw new MSException(ProjectResultCode.CUSTOM_FUNCTION_ALREADY_EXIST); @@ -156,6 +157,7 @@ public class CustomFunctionService { private void checkUpdateExist(CustomFunction customFunction) { CustomFunctionExample example = new CustomFunctionExample(); example.createCriteria() + .andProjectIdEqualTo(customFunction.getProjectId()) .andIdNotEqualTo(customFunction.getId()) .andNameEqualTo(customFunction.getName()); if (customFunctionMapper.countByExample(example) > 0) {