mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-14 05:36:50 +03:00
HStoreField maps to ListField(CharField(allow_blank=True). Closes #2659.
This commit is contained in:
parent
f1e2135b04
commit
402fb39396
|
@ -1430,7 +1430,7 @@ if hasattr(models, 'IPAddressField'):
|
||||||
|
|
||||||
if postgres_fields:
|
if postgres_fields:
|
||||||
class CharMappingField(DictField):
|
class CharMappingField(DictField):
|
||||||
child = CharField()
|
child = CharField(allow_blank=True)
|
||||||
|
|
||||||
ModelSerializer.serializer_field_mapping[postgres_fields.HStoreField] = CharMappingField
|
ModelSerializer.serializer_field_mapping[postgres_fields.HStoreField] = CharMappingField
|
||||||
ModelSerializer.serializer_field_mapping[postgres_fields.ArrayField] = ListField
|
ModelSerializer.serializer_field_mapping[postgres_fields.ArrayField] = ListField
|
||||||
|
|
Loading…
Reference in New Issue
Block a user