HStoreField maps to ListField(CharField(allow_blank=True). Closes #2659.

This commit is contained in:
Tom Christie 2015-07-27 13:18:49 +01:00
parent f1e2135b04
commit 402fb39396

View File

@ -1430,7 +1430,7 @@ if hasattr(models, 'IPAddressField'):
if postgres_fields:
class CharMappingField(DictField):
child = CharField()
child = CharField(allow_blank=True)
ModelSerializer.serializer_field_mapping[postgres_fields.HStoreField] = CharMappingField
ModelSerializer.serializer_field_mapping[postgres_fields.ArrayField] = ListField