From e65273daa66563e6b40f966f30e59d212d36ea36 Mon Sep 17 00:00:00 2001 From: Tim <135014430+nagisa77@users.noreply.github.com> Date: Tue, 19 Aug 2025 09:17:10 +0800 Subject: [PATCH] Use nullable Boolean for rssExcluded --- backend/src/main/java/com/openisle/mapper/PostMapper.java | 2 +- backend/src/main/java/com/openisle/model/Post.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/com/openisle/mapper/PostMapper.java b/backend/src/main/java/com/openisle/mapper/PostMapper.java index a80da01f7..0ef432228 100644 --- a/backend/src/main/java/com/openisle/mapper/PostMapper.java +++ b/backend/src/main/java/com/openisle/mapper/PostMapper.java @@ -63,7 +63,7 @@ public class PostMapper { dto.setCommentCount(commentService.countComments(post.getId())); dto.setStatus(post.getStatus()); dto.setPinnedAt(post.getPinnedAt()); - dto.setRssExcluded(post.isRssExcluded()); + dto.setRssExcluded(post.getRssExcluded() == null || post.getRssExcluded()); List reactions = reactionService.getReactionsForPost(post.getId()) .stream() diff --git a/backend/src/main/java/com/openisle/model/Post.java b/backend/src/main/java/com/openisle/model/Post.java index eb0a81643..d314ca9a0 100644 --- a/backend/src/main/java/com/openisle/model/Post.java +++ b/backend/src/main/java/com/openisle/model/Post.java @@ -68,5 +68,5 @@ public class Post { private LocalDateTime pinnedAt; @Column(nullable = true) - private boolean rssExcluded = true; + private Boolean rssExcluded = true; }