diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java index 63071ee1d6..0c65721b92 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java @@ -698,19 +698,6 @@ public class ApiScenarioService { if (apiScenarioMapper.countByExample(example) > 0) { MSException.throwException(Translator.get("automation_name_already_exists") + " :" + Translator.get("api_definition_module") + request.getModulePath() + " ," + Translator.get("automation_name") + " :" + request.getName()); } - if (StringUtils.isNotBlank(request.getId())) { - ApiScenarioWithBLOBs scenario = apiScenarioMapper.selectByPrimaryKey(request.getId()); - if (scenario != null) { - example = new ApiScenarioExample(); - example.createCriteria().andRefIdEqualTo(scenario.getRefId()).andStatusNotEqualTo("Trash"); - List apiScenarios = apiScenarioMapper.selectByExample(example); - if (apiScenarios != null && apiScenarios.size() > 1) { - if (!StringUtils.equals(scenario.getName(), request.getName())) { - MSException.throwException(Translator.get("automation_versions_update")); - } - } - } - } } public ApiScenarioDTO getNewApiScenario(String id) { diff --git a/api-test/frontend/src/business/automation/api-automation.js b/api-test/frontend/src/business/automation/api-automation.js index 2d3aff8f18..7f087d6f90 100644 --- a/api-test/frontend/src/business/automation/api-automation.js +++ b/api-test/frontend/src/business/automation/api-automation.js @@ -105,7 +105,7 @@ export function saveScenario(url, scenario, scenarioDefinition, _this, success) success(response.data); } }, error => { - _this.$emit('errorRefresh', error); + _this.errorRefresh(); }) }