Skip to content

Commit

Permalink
fix(comments-reply) : adds parent id for replies to comments
Browse files Browse the repository at this point in the history
 - adds the id of the parent comment to the reply array to allow identificaiton

[Finishes : #163644503]
  • Loading branch information
actlikewill committed Feb 1, 2019
1 parent 8c3c113 commit eae5566
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion authors/apps/articles/views/reply.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def list(self, request, article_slug=None, comment_pk=None):
data = serializer.data
return Response({
'replies': data,
'repliesCount': len(data)
'repliesCount': len(data),
'parentId' : comment_pk
}, status=status.HTTP_200_OK) if len(data) else \
Response({
'message': 'No replies found for this comment'
Expand Down

0 comments on commit eae5566

Please sign in to comment.