Added default value for 'detail' param into 'ValidationError' exception (#5342)

This commit is contained in:
Rokker Ruslan 2017-09-26 11:24:30 +03:00 committed by Carlton Gibson
parent 607e4edca7
commit ab7e5c4551

View File

@ -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: