mirror of https://github.com/doccano/doccano.git
pythondatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learningannotation-tool
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
452 B
12 lines
452 B
from rest_framework import status
|
|
from rest_framework.exceptions import APIException
|
|
|
|
|
|
class LabelValidationError(APIException):
|
|
status_code = status.HTTP_400_BAD_REQUEST
|
|
default_detail = 'You cannot create a label with same name or shortcut key.'
|
|
|
|
|
|
class AnnotationRelationValidationError(APIException):
|
|
status_code = status.HTTP_400_BAD_REQUEST
|
|
default_detail = 'You cannot create an annotation relation between the same annotation.'
|