From a7d3cc62c96fc06cc802abc100df86a564fe1a2e Mon Sep 17 00:00:00 2001 From: Rokker Ruslan Date: Sat, 19 Aug 2017 21:53:15 +0300 Subject: [PATCH] Added default value for 'detail' param into 'ValidationError' exception --- 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 aac31c453b..84e8b23c66 100644 --- a/rest_framework/exceptions.py +++ b/rest_framework/exceptions.py @@ -123,7 +123,7 @@ class ValidationError(APIException): default_detail = _('Invalid input.') default_code = 'invalid' - def __init__(self, detail, code=None): + def __init__(self, detail=None, code=None): if detail is None: detail = self.default_detail if code is None: