Skip to content

Commit

Permalink
[FIX] novelIds 리스트 구할 때 null은 제외
Browse files Browse the repository at this point in the history
  • Loading branch information
Kim-TaeUk committed Sep 17, 2024
1 parent b3a58e1 commit 35f50da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/websoso/WSSServer/service/FeedService.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
import lombok.RequiredArgsConstructor;
Expand Down Expand Up @@ -338,6 +339,7 @@ public UserFeedsGetResponse getUserFeeds(User visitor, Long ownerId, Long lastFe

List<Long> novelIds = feedsByNoOffsetPagination.stream()
.map(Feed::getNovelId)
.filter(Objects::nonNull)
.collect(Collectors.toList());
Map<Long, Novel> novelMap = novelRepository.findAllById(novelIds)
.stream()
Expand Down

0 comments on commit 35f50da

Please sign in to comment.