mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-29 21:14:01 +03:00
Merge pull request #1030 from etos/patch-2
Spelling correction on read_only_fields err msg
This commit is contained in:
commit
fbd4c4ee8f
|
@ -685,10 +685,10 @@ class ModelSerializer(Serializer):
|
|||
assert field_name not in self.base_fields.keys(), \
|
||||
"field '%s' on serializer '%s' specified in " \
|
||||
"`read_only_fields`, but also added " \
|
||||
"as an explict field. Remove it from `read_only_fields`." % \
|
||||
"as an explicit field. Remove it from `read_only_fields`." % \
|
||||
(field_name, self.__class__.__name__)
|
||||
assert field_name in ret, \
|
||||
"Noexistant field '%s' specified in `read_only_fields` " \
|
||||
"Non-existant field '%s' specified in `read_only_fields` " \
|
||||
"on serializer '%s'." % \
|
||||
(field_name, self.__class__.__name__)
|
||||
ret[field_name].read_only = True
|
||||
|
|
Loading…
Reference in New Issue
Block a user