From 00778e3d2425bb6b84fcab6bc36676feafcfb01c Mon Sep 17 00:00:00 2001 From: George Hickman Date: Thu, 21 Mar 2013 00:23:31 -0700 Subject: [PATCH] Use built-in status code variables --- rest_framework/exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/exceptions.py b/rest_framework/exceptions.py index 229c8df82..89dc88fe3 100644 --- a/rest_framework/exceptions.py +++ b/rest_framework/exceptions.py @@ -98,7 +98,7 @@ class PreconditionFailed(APIException): class IfMatchMissing(APIException): default_detail = 'IF_MATCH header is required' - status_code = 400 + status_code = status.HTTP_400_BAD_REQUEST def __init__(self, detail=None): self.detail = detail or self.default_detail