Skip to content

Commit

Permalink
[hotfix] fix: 노트 단건 조회시 댓글 없는 노트도 정상조회되도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
elive7 committed Nov 24, 2024
1 parent e215df3 commit 96d4a1a
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ public Optional<Note> findById(Long id, Long userId) {
.where(
note.id.eq(id),
note.deletedAt.isNull(),
comment.writer.notIn(
JPAExpressions.select(block.blocked)
.from(block)
.where(block.blocker.id.eq(userId).and(block.deletedAt.isNull()))
)
comment.isNull()
.or(comment.writer.notIn(
JPAExpressions.select(block.blocked)
.from(block)
.where(block.blocker.id.eq(userId).and(block.deletedAt.isNull()))
))
)
.fetchOne()
);
Expand Down

0 comments on commit 96d4a1a

Please sign in to comment.