superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: [postgres] adding support to serialized timedelta (#3444)
Date Tue, 12 Sep 2017 16:06:56 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 7c1b56f  [postgres] adding support to serialized timedelta (#3444)
7c1b56f is described below

commit 7c1b56f3a95a89dc8200bf91bfa609e7760707da
Author: Maxime Beauchemin <maximebeauchemin@gmail.com>
AuthorDate: Tue Sep 12 09:06:53 2017 -0700

    [postgres] adding support to serialized timedelta (#3444)
---
 superset/utils.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/superset/utils.py b/superset/utils.py
index fe43bc4..1c792f0 100644
--- a/superset/utils.py
+++ b/superset/utils.py
@@ -20,7 +20,7 @@ import sys
 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
@@ -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):

-- 
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <commits@superset.apache.org>'].

Mime
View raw message