mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-23 14:40:06 +03:00
Update serializers.py
Change field.field_name to field.label in to_internal_value function
This commit is contained in:
parent
b7523f4b9f
commit
d1ed262108
|
@ -486,9 +486,9 @@ class Serializer(BaseSerializer, metaclass=SerializerMetaclass):
|
|||
if validate_method is not None:
|
||||
validated_value = validate_method(validated_value)
|
||||
except ValidationError as exc:
|
||||
errors[field.field_name] = exc.detail
|
||||
errors[field.label] = exc.detail
|
||||
except DjangoValidationError as exc:
|
||||
errors[field.field_name] = get_error_detail(exc)
|
||||
errors[field.label] = get_error_detail(exc)
|
||||
except SkipField:
|
||||
pass
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user