Skip to content

Commit

Permalink
If we fail to return a serializble type fallback to standard default …
Browse files Browse the repository at this point in the history
…method to raise exception, rather then recursing forever causing max recursion depth exceeded error. (#80)
  • Loading branch information
Psynbiotik authored and nadouani committed Sep 25, 2018
1 parent be80a7d commit da76a6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thehive4py/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def default(self, o):
if isinstance(o, JSONSerializable):
return o.__dict__
else:
return json.JSONEncoder.encode(self, o)
return json.JSONEncoder.default(self, o)


class JSONSerializable(object):
Expand Down

0 comments on commit da76a6b

Please sign in to comment.