Skip to content

Commit

Permalink
HStoreField maps to ListField(CharField(allow_blank=True). Closes #2659.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchristie committed Jul 27, 2015
1 parent f1e2135 commit 402fb39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest_framework/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,7 @@ def get_unique_for_date_validators(self):

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
Expand Down

0 comments on commit 402fb39

Please sign in to comment.