Skip to content

Commit

Permalink
[postgres] adding support to serialized timedelta
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Sep 12, 2017
1 parent 147c12d commit 0a3a4ea
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 0a3a4ea

Please sign in to comment.