aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/serializers.py
diff options
context:
space:
mode:
authorFernando Rocha2013-02-11 19:18:22 -0300
committerFernando Rocha2013-02-11 19:18:22 -0300
commitea004b5e7a51ccf176545642692462dc2086056d (patch)
treee8de6cdce7965936e053aadbe0ac397bab47191e /rest_framework/serializers.py
parent41364b3be0536a606d9b41d3792c2e562b860360 (diff)
downloaddjango-rest-framework-ea004b5e7a51ccf176545642692462dc2086056d.tar.bz2
Make use o issubclass instead of isinstance (fix issue #645)
Because __mro__ is a list of classes and not instances. DictWithMetadata.__getstate__ was never called Signed-off-by: Fernando Rocha <fernandogrd@gmail.com>
Diffstat (limited to 'rest_framework/serializers.py')
-rw-r--r--rest_framework/serializers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py
index 4fb802a7..df1e9fae 100644
--- a/rest_framework/serializers.py
+++ b/rest_framework/serializers.py
@@ -31,7 +31,7 @@ class DictWithMetadata(dict):
"""
# return an instance of the first dict in MRO that isn't a DictWithMetadata
for base in self.__class__.__mro__:
- if not isinstance(base, DictWithMetadata) and isinstance(base, dict):
+ if not issubclass(base, DictWithMetadata) and issubclass(base, dict):
return base(self)