fix: 用例保存500

This commit is contained in:
zhangdahai112 2022-01-24 18:25:29 +08:00 committed by zhangdahai112
parent acbf2a4881
commit 58eef7235b
1 changed files with 2 additions and 0 deletions

View File

@ -2452,6 +2452,8 @@ public class TestCaseService {
* @param versionId * @param versionId
*/ */
private void checkAndSetLatestVersion(String refId, String versionId, String projectId) { private void checkAndSetLatestVersion(String refId, String versionId, String projectId) {
if (StringUtils.isAnyBlank(refId, versionId, projectId))
return;
TestCaseExample e = new TestCaseExample(); TestCaseExample e = new TestCaseExample();
e.createCriteria().andRefIdEqualTo(refId).andLatestEqualTo(true); e.createCriteria().andRefIdEqualTo(refId).andLatestEqualTo(true);
//如果因为删除导致没有了最新的版本则按照版本创建顺序选择一个版本为最新版本 //如果因为删除导致没有了最新的版本则按照版本创建顺序选择一个版本为最新版本