Commit 402fb393 by Tom Christie

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

parent f1e2135b
...@@ -1430,7 +1430,7 @@ if hasattr(models, 'IPAddressField'): ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment