fix: 编辑测试计划时,若该工作空间存在同名测试计划会报错

This commit is contained in:
chenjianxing 2021-09-28 10:46:05 +08:00 committed by jianxing
parent cded9b1ad4
commit a1abd2fd76
1 changed files with 1 additions and 1 deletions

View File

@ -348,7 +348,7 @@ public class TestPlanService {
TestPlanExample example = new TestPlanExample();
example.createCriteria()
.andNameEqualTo(testPlan.getName())
.andWorkspaceIdEqualTo(SessionUtils.getCurrentWorkspaceId())
.andProjectIdEqualTo(testPlan.getProjectId())
.andIdNotEqualTo(testPlan.getId());
if (testPlanMapper.selectByExample(example).size() > 0) {
MSException.throwException(Translator.get("plan_name_already_exists"));