fix(接口测试): 解决多版本创建问题

此次解决将多版本逻辑场景名称不能相同改为可以相同
修复由此问题报错导致页面一直loading问题
This commit is contained in:
guoyuqi 2022-10-13 14:36:10 +08:00 committed by xiaomeinvG
parent 60cc471560
commit c24d8ee3e1
2 changed files with 1 additions and 14 deletions

View File

@ -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<ApiScenario> 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) {

View File

@ -105,7 +105,7 @@ export function saveScenario(url, scenario, scenarioDefinition, _this, success)
success(response.data);
}
}, error => {
_this.$emit('errorRefresh', error);
_this.errorRefresh();
})
}