diff options
Diffstat (limited to 'rest_framework/utils/encoders.py')
| -rw-r--r-- | rest_framework/utils/encoders.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/rest_framework/utils/encoders.py b/rest_framework/utils/encoders.py index 22b1ab3d..3ac920c6 100644 --- a/rest_framework/utils/encoders.py +++ b/rest_framework/utils/encoders.py @@ -47,8 +47,7 @@ class JSONEncoder(json.JSONEncoder): elif hasattr(o, '__getitem__'): try: return dict(o) - except KeyError: - # Couldn't convert to a dict, fall through + except: pass elif hasattr(o, '__iter__'): return [i for i in o] |
