def edit_comment_of_issue(comment_id, comment_content, user):
    comment = IssueComment.objects.get(pk=comment_id)
    _throwIfNotCommentAuthor(comment, user)
    old_json = comment.to_json()
    comment.changeContent(comment_content)
    ActionLog.log_edit_issue_comment(issue_comment=comment, old_json=old_json)
    return comment
Ejemplo n.º 2
0
def edit_comment_of_issue(comment_id, comment_content, user):
    comment = IssueComment.objects.get(pk=comment_id)
    _throwIfNotCommentAuthor(comment, user)
    old_json = comment.to_json()
    comment.changeContent(comment_content)
    ActionLog.log_edit_issue_comment(issue_comment=comment, old_json=old_json)
    return comment