

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

dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/logging/views.py AlertViewSet.acknowledge/VarMisuse@50/154 `alert`->`request`