mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-25 11:04:02 +03:00
Fix AttributeError on renamed _field_mapping
This commit is contained in:
parent
4ee4b4f2dc
commit
760b25bc20
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user