Fix bug in discussion API comment update
This bug caused any attempt to update a comment with a non-null
parent_id to result in a 500 error without applying the update. The bug
was introduced in commit 2c7590d197.
This commit is contained in:
@@ -85,11 +85,7 @@ def _get_comment_and_context(request, comment_id):
|
||||
"""
|
||||
try:
|
||||
cc_comment = Comment(id=comment_id).retrieve()
|
||||
_, context = _get_thread_and_context(
|
||||
request,
|
||||
cc_comment["thread_id"],
|
||||
cc_comment["parent_id"]
|
||||
)
|
||||
_, context = _get_thread_and_context(request, cc_comment["thread_id"])
|
||||
return cc_comment, context
|
||||
except CommentClientRequestError:
|
||||
raise Http404
|
||||
|
||||
Reference in New Issue
Block a user