mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-04-28 04:53:43 +03:00
Don't convert dictionary into a string representation
This commit is contained in:
parent
b9bff2a984
commit
3de61d200c
|
@ -90,6 +90,8 @@ class Field(object):
|
||||||
return value
|
return value
|
||||||
elif hasattr(value, '__iter__') and not isinstance(value, (dict, basestring)):
|
elif hasattr(value, '__iter__') and not isinstance(value, (dict, basestring)):
|
||||||
return [self.to_native(item) for item in value]
|
return [self.to_native(item) for item in value]
|
||||||
|
elif isinstance(value, dict):
|
||||||
|
return dict((k, self.to_native(v)) for k, v in value.items())
|
||||||
return smart_unicode(value)
|
return smart_unicode(value)
|
||||||
|
|
||||||
def attributes(self):
|
def attributes(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user