Browse Source

Merge pull request #1449 from youichiro/fix_typo_of_exception_name

Fix typo of exception name
pull/1458/head
Hiroki Nakayama 3 years ago
committed by GitHub
parent
commit
80c855bc31
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions
  1. 2
      backend/api/exceptions.py
  2. 4
      backend/api/views/auto_labeling.py

2
backend/api/exceptions.py

@ -18,7 +18,7 @@ class AutoLabelingException(APIException):
default_detail = 'Auto labeling not allowed for the document with labels.'
class AutoLabeliingPermissionDenied(PermissionDenied):
class AutoLabelingPermissionDenied(PermissionDenied):
default_detail = 'You do not have permission to perform auto labeling.' \
'Please ask the project administrators to add you.'

4
backend/api/views/auto_labeling.py

@ -16,7 +16,7 @@ from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from rest_framework.views import APIView
from ..exceptions import (AutoLabeliingPermissionDenied, AutoLabelingException,
from ..exceptions import (AutoLabelingException, AutoLabelingPermissionDenied,
AWSTokenError, SampleDataException,
TemplateMappingError, URLConnectionError)
from ..models import AutoLabelingConfig, Example, Project
@ -234,7 +234,7 @@ class AutoLabelingAnnotation(generics.CreateAPIView):
example = self.get_example(project)
config = project.auto_labeling_config.first()
if not config:
raise AutoLabeliingPermissionDenied()
raise AutoLabelingPermissionDenied()
return execute_pipeline(
text=example,
project_type=project.project_type,

Loading…
Cancel
Save