mirror of https://github.com/doccano/doccano.git
pythondatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learningannotation-tool
12 lines
425 B
12 lines
425 B
from rest_framework import status
|
|
from rest_framework.exceptions import APIException
|
|
|
|
|
|
class RoleConstraintException(APIException):
|
|
status_code = status.HTTP_400_BAD_REQUEST
|
|
default_detail = "The project needs at least one administrator."
|
|
|
|
|
|
class RoleAlreadyAssignedException(APIException):
|
|
status_code = status.HTTP_400_BAD_REQUEST
|
|
default_detail = "This user is already assigned to a role in this project."
|