mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-29 17:39:48 +03:00
Use built-in status code variables
This commit is contained in:
parent
61f6fe2b81
commit
00778e3d24
|
@ -98,7 +98,7 @@ class PreconditionFailed(APIException):
|
||||||
|
|
||||||
class IfMatchMissing(APIException):
|
class IfMatchMissing(APIException):
|
||||||
default_detail = 'IF_MATCH header is required'
|
default_detail = 'IF_MATCH header is required'
|
||||||
status_code = 400
|
status_code = status.HTTP_400_BAD_REQUEST
|
||||||
|
|
||||||
def __init__(self, detail=None):
|
def __init__(self, detail=None):
|
||||||
self.detail = detail or self.default_detail
|
self.detail = detail or self.default_detail
|
||||||
|
|
Loading…
Reference in New Issue
Block a user