diff --git a/src/main/java/org/poolc/api/comment/service/CommentService.java b/src/main/java/org/poolc/api/comment/service/CommentService.java index c426d289..3aa1b20c 100644 --- a/src/main/java/org/poolc/api/comment/service/CommentService.java +++ b/src/main/java/org/poolc/api/comment/service/CommentService.java @@ -26,7 +26,7 @@ public class CommentService { private final NotificationService notificationService; public Comment createComment(CommentCreateValues values) { Comment parent = null; - if (values.getParentId() != 0 && values.getParentId() != null) parent = findById(values.getParentId()); + if (values.getParentId() != null && values.getParentId() != 0) parent = findById(values.getParentId()); if (parent != null && parent.getIsChild()) { throw new IllegalArgumentException("대댓글에 대댓글을 달 수 없습니다."); } else {