From 760b25bc20a1434cbdd69dc0b13bacdc3bbedd7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Padilla?= Date: Fri, 30 Jan 2015 11:36:03 -0400 Subject: [PATCH] Fix AttributeError on renamed _field_mapping --- rest_framework/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py index a3b8196bd..a91fe23e0 100644 --- a/rest_framework/serializers.py +++ b/rest_framework/serializers.py @@ -1330,13 +1330,13 @@ class ModelSerializer(Serializer): if hasattr(models, 'UUIDField'): - ModelSerializer._field_mapping[models.UUIDField] = UUIDField + ModelSerializer.serializer_field_mapping[models.UUIDField] = UUIDField if postgres_fields: class CharMappingField(DictField): child = CharField() - ModelSerializer._field_mapping[postgres_fields.HStoreField] = CharMappingField + ModelSerializer.serializer_field_mapping[postgres_fields.HStoreField] = CharMappingField class HyperlinkedModelSerializer(ModelSerializer):