mirror of
https://github.com/encode/django-rest-framework.git
synced 2026-02-18 05:00:33 +03:00
Tweak formatting
This commit is contained in:
parent
795e149c02
commit
f4b6dd0849
|
|
@ -313,11 +313,11 @@ class SerializerMetaclass(type):
|
|||
|
||||
def as_serializer_error(exc):
|
||||
"""
|
||||
coerce validation exceptions into a standardized serializer error format.
|
||||
Coerce validation exceptions into a standardized serialized error format.
|
||||
|
||||
this function normalizes both Django's 'ValidationError' and REST
|
||||
framework's 'ValidationError' into a dictionary structure compatible
|
||||
with serializer '.errors', ensuring all values are represented as
|
||||
This function normalizes both Django's `ValidationError` and REST
|
||||
framework's `ValidationError` into a dictionary structure compatible
|
||||
with serializer `.errors`, ensuring all values are represented as
|
||||
lists of error details.
|
||||
|
||||
The returned structure conforms to the serializer error contract:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user