mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-27 17:54:08 +03:00
commit
3eade5abeb
|
@ -129,8 +129,8 @@ class ValidationError(APIException):
|
||||||
if code is None:
|
if code is None:
|
||||||
code = self.default_code
|
code = self.default_code
|
||||||
|
|
||||||
# For validation failures, we may collect may errors together, so the
|
# For validation failures, we may collect many errors together,
|
||||||
# details should always be coerced to a list if not already.
|
# so the details should always be coerced to a list if not already.
|
||||||
if not isinstance(detail, dict) and not isinstance(detail, list):
|
if not isinstance(detail, dict) and not isinstance(detail, list):
|
||||||
detail = [detail]
|
detail = [detail]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user