fix(用例评审): 修复用例评审获取评论时会出现的空指针问题
This commit is contained in:
parent
236e572d9b
commit
9e8a8d9caf
|
@ -61,7 +61,8 @@ public class TestCaseCommentService {
|
|||
testCaseComments.forEach(testCaseComment -> {
|
||||
String authorId = testCaseComment.getAuthor();
|
||||
User user = userMapper.selectByPrimaryKey(authorId);
|
||||
testCaseComment.setAuthor(user.getName());
|
||||
String author = user == null ? authorId : user.getName();
|
||||
testCaseComment.setAuthor(author);
|
||||
});
|
||||
return testCaseComments;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue