Fixed reversed arguments in assertion

This commit is contained in:
Kevin Brown 2013-07-26 10:59:51 -04:00
parent 0fa9866848
commit 103fed9667

View File

@ -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