Skip to content

Commit

Permalink
[postgres] adding support to serialized timedelta (#3444)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored Sep 12, 2017
1 parent 3e9f797 commit 7c1b56f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion superset/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import zlib

from builtins import object
from datetime import date, datetime, time
from datetime import date, datetime, time, timedelta

import celery
from dateutil.parser import parse
Expand Down Expand Up @@ -278,6 +278,8 @@ def base_json_conv(obj):
return float(obj)
elif isinstance(obj, uuid.UUID):
return str(obj)
elif isinstance(obj, timedelta):
return str(obj)


def json_iso_dttm_ser(obj):
Expand Down

0 comments on commit 7c1b56f

Please sign in to comment.