fix: 功能用例选择版本导入报错
--bug=1010044 --user=陈建星 【测试跟踪】功能用例导入非最新版,报错了 https://www.tapd.cn/55049933/s/1099636
This commit is contained in:
parent
f779e29a13
commit
798252ec4a
|
@ -729,9 +729,11 @@ public class TestCaseService {
|
||||||
if (multipartFile == null) {
|
if (multipartFile == null) {
|
||||||
MSException.throwException(Translator.get("upload_fail"));
|
MSException.throwException(Translator.get("upload_fail"));
|
||||||
}
|
}
|
||||||
if (StringUtils.isBlank(request.getVersionId()) && StringUtils.equals(request.getImportType(), FunctionCaseImportEnum.Create.name())) {
|
if (StringUtils.equals(request.getImportType(), FunctionCaseImportEnum.Create.name())) {
|
||||||
// 创建如果没选版本就创建最新版本,更新时没选就更新最近版本的用例
|
// 创建如果没选版本就创建最新版本,更新时没选就更新最近版本的用例
|
||||||
request.setVersionId(extProjectVersionMapper.getDefaultVersion(request.getProjectId()));
|
if (StringUtils.isBlank(request.getVersionId())) {
|
||||||
|
request.setVersionId(extProjectVersionMapper.getDefaultVersion(request.getProjectId()));
|
||||||
|
}
|
||||||
int nextNum = getNextNum(request.getProjectId());
|
int nextNum = getNextNum(request.getProjectId());
|
||||||
importCreateNum.set(nextNum);
|
importCreateNum.set(nextNum);
|
||||||
beforeImportCreateNum.set(nextNum);
|
beforeImportCreateNum.set(nextNum);
|
||||||
|
|
Loading…
Reference in New Issue