mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 01:57:00 +03:00
Fixed reversed arguments in assertion
This commit is contained in:
parent
0fa9866848
commit
103fed9667
|
@ -690,7 +690,7 @@ class ModelSerializer(Serializer):
|
||||||
assert field_name in ret, \
|
assert field_name in ret, \
|
||||||
"Noexistant field '%s' specified in `read_only_fields` " \
|
"Noexistant field '%s' specified in `read_only_fields` " \
|
||||||
"on serializer '%s'." % \
|
"on serializer '%s'." % \
|
||||||
(self.__class__.__name__, field_name)
|
(field_name, self.__class__.__name__)
|
||||||
ret[field_name].read_only = True
|
ret[field_name].read_only = True
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
Loading…
Reference in New Issue
Block a user