diff options
| author | Tom Christie | 2013-07-26 08:25:03 -0700 |
|---|---|---|
| committer | Tom Christie | 2013-07-26 08:25:03 -0700 |
| commit | 0e8a01e5de73507ab84693f594c8e78826cf6a8f (patch) | |
| tree | fac99a781a47942a687c7500de00ceb3bc1f558a | |
| parent | 0fa9866848238ed355461a619e5aa9a148403f5f (diff) | |
| parent | 9088c18da85bc56b363f5f1995159cc26e102254 (diff) | |
| download | django-rest-framework-0e8a01e5de73507ab84693f594c8e78826cf6a8f.tar.bz2 | |
Merge pull request #1010 from kevin-brown/issue_1008
Fixed arguments in assertion
| -rw-r--r-- | docs/topics/credits.md | 2 | ||||
| -rw-r--r-- | rest_framework/serializers.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/docs/topics/credits.md b/docs/topics/credits.md index dcd147e3..f6e77996 100644 --- a/docs/topics/credits.md +++ b/docs/topics/credits.md @@ -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 diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py index 023f7ccf..682a99a4 100644 --- a/rest_framework/serializers.py +++ b/rest_framework/serializers.py @@ -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 |
