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 b0b12a38e1
commit 14b1ad7e01
1 changed files with 4 additions and 2 deletions

View File

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