From 340e65926fac55f4dfa5575526c71aa13b86e44b Mon Sep 17 00:00:00 2001 From: Jackson Barbosa Date: Wed, 4 Oct 2023 12:03:44 -0300 Subject: [PATCH] back zeroshot permissions --- bothub/api/v2/zeroshot/permissions.py | 2 -- bothub/api/v2/zeroshot/views.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/bothub/api/v2/zeroshot/permissions.py b/bothub/api/v2/zeroshot/permissions.py index be4e9097..718708a5 100644 --- a/bothub/api/v2/zeroshot/permissions.py +++ b/bothub/api/v2/zeroshot/permissions.py @@ -18,5 +18,3 @@ def has_permission(self, request, view): else: return False - def has_object_permission(self, request, view, obj): - return self.has_object_permission(request, view, obj) diff --git a/bothub/api/v2/zeroshot/views.py b/bothub/api/v2/zeroshot/views.py index 7a8a5572..0da595ac 100644 --- a/bothub/api/v2/zeroshot/views.py +++ b/bothub/api/v2/zeroshot/views.py @@ -17,7 +17,7 @@ from bothub.api.v2.zeroshot.permissions import ZeroshotTokenPermission -logger = logging.getLogger(__name__) +logger = logging.getLogger("bohtub") class ZeroShotOptionsTextAPIView(APIView): @@ -76,7 +76,7 @@ def get(self, request): class ZeroShotFastPredictAPIView(APIView): - # permission_classes = [ZeroshotTokenPermission] + permission_classes = [ZeroshotTokenPermission] def post(self, request): logger.info(f"request data: {request.META}")