Skip to content

Commit

Permalink
Fix bug where json encoded timedeltas returning 0 seconds failed
Browse files Browse the repository at this point in the history
  • Loading branch information
hannseman committed Oct 9, 2013
1 parent aa603e1 commit 153dc9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion formapi/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class DjangoJSONEncoder(JSONEncoder):

def default(self, obj):
date_obj = self.default_date(obj)
if date_obj:
if date_obj is not None:
return date_obj
elif isinstance(obj, decimal.Decimal):
return str(obj)
Expand Down

0 comments on commit 153dc9d

Please sign in to comment.