

def destroy(self, request, *args, **kwargs):
    instance = self.get_object()
    if (not instance.is_in_quarantine):
        instance.delete()
        return Response(status=status.HTTP_204_NO_CONTENT)
    else:
        return Response(status=status.HTTP_401_UNAUTHORIZED)

dataset/ETHPy150Open globocom/database-as-a-service/dbaas/api/database.py DatabaseAPI.destroy/original