mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 10:03:57 +03:00
Merge pull request #1010 from kevin-brown/issue_1008
Fixed arguments in assertion
This commit is contained in:
commit
0e8a01e5de
|
@ -149,6 +149,7 @@ The following people have helped make REST framework great.
|
|||
* Matthias Jacob - [cyroxx]
|
||||
* Pavel Zinovkin - [pzinovkin]
|
||||
* Will Kahn-Greene - [willkg]
|
||||
* Kevin Brown - [kevin-brown]
|
||||
|
||||
Many thanks to everyone who's contributed to the project.
|
||||
|
||||
|
@ -334,3 +335,4 @@ You can also contact [@_tomchristie][twitter] directly on twitter.
|
|||
[cyroxx]: https://github.com/cyroxx
|
||||
[pzinovkin]: https://github.com/pzinovkin
|
||||
[willkg]: https://github.com/willkg
|
||||
[kevin-brown]: https://github.com/kevin-brown
|
||||
|
|
|
@ -690,7 +690,7 @@ class ModelSerializer(Serializer):
|
|||
assert field_name in ret, \
|
||||
"Noexistant field '%s' specified in `read_only_fields` " \
|
||||
"on serializer '%s'." % \
|
||||
(self.__class__.__name__, field_name)
|
||||
(field_name, self.__class__.__name__)
|
||||
ret[field_name].read_only = True
|
||||
|
||||
return ret
|
||||
|
|
Loading…
Reference in New Issue
Block a user