fix(测试跟踪): 脑图创建用例报错

--bug=1015526 --user=陈建星 [测试跟踪]github#16457升级到v2.0.0版本后,脑图新增用例保存报错500,后台服务日志报NullPointerException {#_orginal_url#}
This commit is contained in:
chenjianxing 2022-07-29 10:34:35 +08:00 committed by jianxing
parent e6a10f4d98
commit 21e9b8d796
1 changed files with 4 additions and 2 deletions

View File

@ -238,8 +238,10 @@ public class TestCaseService {
testCaseMapper.insert(request); testCaseMapper.insert(request);
saveFollows(request.getId(), request.getFollows()); saveFollows(request.getId(), request.getFollows());
List<CustomFieldResource> addFields = request.getAddFields(); List<CustomFieldResource> addFields = request.getAddFields();
addFields.addAll(request.getEditFields()); if (CollectionUtils.isNotEmpty(addFields)) {
customFieldTestCaseService.addFields(request.getId(), addFields); addFields.addAll(request.getEditFields());
customFieldTestCaseService.addFields(request.getId(), addFields);
}
return request; return request;
} }