Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
okeneo committed Feb 24, 2024
1 parent 17fd9fd commit 8bb7343
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/post/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ class Meta:
fields = "__all__"

def get_replies(self, obj):
# Recursively serialize replies.
# replies represents the immediate descendants (i.e., children) of a particular comment.
# Recursively serialize replies. `replies` represents the immediate children
# of a particular comment.
replies = Comment.objects.filter(post=obj.post, parent_comment=obj)
serializer = CommentTreeSerializer(replies, many=True)
return serializer.data

0 comments on commit 8bb7343

Please sign in to comment.