Update exceptions.py

fix flake8 in code
This commit is contained in:
mojtaba 2023-08-31 13:31:21 +03:30 committed by GitHub
parent f277956924
commit 8fc9a29f74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -203,11 +203,13 @@ class NotFound(APIException):
default_detail = _('Not found.') default_detail = _('Not found.')
default_code = 'not_found' default_code = 'not_found'
class Conflict(APIException): class Conflict(APIException):
status_code = status.HTTP_409_CONFLICT status_code = status.HTTP_409_CONFLICT
default_detail = _('Conflict request.') default_detail = _('Conflict request.')
default_code = 'conflict_error' default_code = 'conflict_error'
class MethodNotAllowed(APIException): class MethodNotAllowed(APIException):
status_code = status.HTTP_405_METHOD_NOT_ALLOWED status_code = status.HTTP_405_METHOD_NOT_ALLOWED
default_detail = _('Method "{method}" not allowed.') default_detail = _('Method "{method}" not allowed.')