Merge pull request #627 from nagisa77/codex/fix-null-value-assignment-error

Handle nullable rssExcluded flag
This commit is contained in:
Tim
2025-08-19 09:17:23 +08:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
@@ -63,7 +63,7 @@ public class PostMapper {
dto.setCommentCount(commentService.countComments(post.getId())); dto.setCommentCount(commentService.countComments(post.getId()));
dto.setStatus(post.getStatus()); dto.setStatus(post.getStatus());
dto.setPinnedAt(post.getPinnedAt()); dto.setPinnedAt(post.getPinnedAt());
dto.setRssExcluded(post.isRssExcluded()); dto.setRssExcluded(post.getRssExcluded() == null || post.getRssExcluded());
List<ReactionDto> reactions = reactionService.getReactionsForPost(post.getId()) List<ReactionDto> reactions = reactionService.getReactionsForPost(post.getId())
.stream() .stream()
@@ -68,5 +68,5 @@ public class Post {
private LocalDateTime pinnedAt; private LocalDateTime pinnedAt;
@Column(nullable = true) @Column(nullable = true)
private boolean rssExcluded = true; private Boolean rssExcluded = true;
} }