mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-24 23:19:47 +03:00
Don't attempt to convert dictionary keys
This commit is contained in:
parent
497da7fc69
commit
5a1df32035
|
@ -283,7 +283,7 @@ class BaseSerializer(Field):
|
||||||
"""
|
"""
|
||||||
Serialize objects -> primitives.
|
Serialize objects -> primitives.
|
||||||
"""
|
"""
|
||||||
if hasattr(obj, '__iter__'):
|
if hasattr(obj, '__iter__') and not hasattr(obj, '__dict__'):
|
||||||
return [self.convert_object(item) for item in obj]
|
return [self.convert_object(item) for item in obj]
|
||||||
return self.convert_object(obj)
|
return self.convert_object(obj)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user