def delete_and_respond(self, request, contribution, comment):
        user = self.get_user(request)

        if comment.creator == user or contribution.project.can_moderate(user):
            comment.delete()

            if (contribution.status == 'review' and
                    not contribution.comments.filter(
                        review_status='open').exists()):
                contribution.update(None, user, status='active')

            return Response(status=status.HTTP_204_NO_CONTENT)
        else:
            raise PermissionDenied(
                'You are neither the author if this comment nor a project '
                'moderator and therefore not eligable to delete it.'
            )
Respond to a DELETE request by deleting the comment.
dataset/ETHPy150Open ExCiteS/geokey/geokey/contributions/views/comments.py/CommentAbstractAPIView.delete_and_respond