diff --git a/test-track/backend/src/main/java/io/metersphere/service/TestCaseReviewService.java b/test-track/backend/src/main/java/io/metersphere/service/TestCaseReviewService.java index 64e575a2ab..90c36407ae 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TestCaseReviewService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TestCaseReviewService.java @@ -264,7 +264,12 @@ public class TestCaseReviewService { List 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); + } + }); } }); }