diff --git a/rest_framework/exceptions.py b/rest_framework/exceptions.py index 12fd419312..d885ba6432 100644 --- a/rest_framework/exceptions.py +++ b/rest_framework/exceptions.py @@ -92,7 +92,7 @@ def __init__(self, detail=None, code=None): self.detail = _get_error_details(detail, code) def __str__(self): - return self.detail + return six.text_type(self.detail) def get_codes(self): """ @@ -136,9 +136,6 @@ def __init__(self, detail=None, code=None): self.detail = _get_error_details(detail, code) - def __str__(self): - return six.text_type(self.detail) - class ParseError(APIException): status_code = status.HTTP_400_BAD_REQUEST