mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-03 05:04:31 +03:00
commit
24855f70ac
|
@ -935,7 +935,7 @@ class ModelSerializer(Serializer):
|
||||||
# If `Meta.exclude` is included, then remove those fields.
|
# If `Meta.exclude` is included, then remove those fields.
|
||||||
for field_name in exclude:
|
for field_name in exclude:
|
||||||
assert field_name in fields, (
|
assert field_name in fields, (
|
||||||
"The field '{field_name}' was include on serializer "
|
"The field '{field_name}' was included on serializer "
|
||||||
"{serializer_class} in the 'exclude' option, but does "
|
"{serializer_class} in the 'exclude' option, but does "
|
||||||
"not match any model field.".format(
|
"not match any model field.".format(
|
||||||
field_name=field_name,
|
field_name=field_name,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user