mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-07-22 12:36:08 +00:00
Merge pull request #627 from nagisa77/codex/fix-null-value-assignment-error
Handle nullable rssExcluded flag
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user