fix(测试跟踪): 用例评审人中有已经删除的用户,页面无法加载

--bug=1023907 --user=陈建星 [测试跟踪]github #222392.6升级到2.7部分项目下用例评审不显示 https://www.tapd.cn/55049933/s/1344668
This commit is contained in:
chenjianxing 2023-03-01 18:39:08 +08:00 committed by fit2-zhao
parent 376566bd0e
commit 210d9b9858

View File

@ -264,7 +264,12 @@ public class TestCaseReviewService {
List<TestCaseReviewUsers> reviewUsers = reviewUserMap.get(item.getId());
if (CollectionUtils.isNotEmpty(reviewUsers)) {
item.setReviewers(new ArrayList<>());
reviewUsers.forEach(reviewUser -> item.getReviewers().add(userMap.get(reviewUser.getUserId())));
reviewUsers.forEach(reviewUser -> {
User user = userMap.get(reviewUser.getUserId());
if (user != null) {
item.getReviewers().add(user);
}
});
}
});
}