

@decorators.detail_route(methods=['post'])
def cancel_acknowledgment(self, request, *args, **kwargs):
    '\n        To cancel alert acknowledgment - run **POST** against */api/alerts/<alert_uuid>/cancel_acknowledgment/*.\n        No payload is required. All users that can see alerts can also cancel it acknowledgment.\n        If alert is not acknowledged endpoint will return error with code 409 (conflict).\n        '
    alert = self.get_object()
    if alert.acknowledged:
        alert.cancel_acknowledgment()
        return response.Response(status=status.HTTP_200_OK)
    else:
        return response.Response({
            'detail': 'Alert is not acknowledged',
        }, status=status.HTTP_409_CONFLICT)

dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/logging/views.py AlertViewSet.cancel_acknowledgment/original