Skip to content

Commit ab7e5c4

Browse files
Rokker RuslanCarlton Gibson
authored andcommitted
Added default value for 'detail' param into 'ValidationError' exception (#5342)
1 parent 607e4ed commit ab7e5c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class ValidationError(APIException):
123123
default_detail = _('Invalid input.')
124124
default_code = 'invalid'
125125

126-
def __init__(self, detail, code=None):
126+
def __init__(self, detail=None, code=None):
127127
if detail is None:
128128
detail = self.default_detail
129129
if code is None:

0 commit comments

Comments
 (0)