From 0ec9cd4ad279c24b6d65fb825a319357958297fd Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Tue, 25 Jul 2017 21:30:40 -0700 Subject: [PATCH] [bugfix] numeric value for date fields in table viz (#3036) Bug was present only when using the NOT GROUPED BY option fixes https://github.com/ApacheInfra/superset/issues/3027 --- superset/viz.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/superset/viz.py b/superset/viz.py index 6778c3511e..19ff165e26 100755 --- a/superset/viz.py +++ b/superset/viz.py @@ -353,6 +353,12 @@ class TableViz(BaseViz): columns=list(df.columns), ) + def json_dumps(self, obj): + if self.form_data.get('all_columns'): + return json.dumps(obj, default=utils.json_iso_dttm_ser) + else: + return super(TableViz, self).json_dumps(obj) + class PivotTableViz(BaseViz):