Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mahmoud/clastic
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoud committed Feb 3, 2016
2 parents e176f2b + dc1476f commit eedbc63
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion clastic/render/simple.py
Expand Up @@ -25,7 +25,10 @@ def default(self, obj):
except:
pass
if isinstance(obj, Sized) and isinstance(obj, Iterable):
return list(obj)
try:
return list(obj)
except:
pass
if callable(getattr(obj, 'to_dict', None)):
return obj.to_dict()

Expand Down

0 comments on commit eedbc63

Please sign in to comment.