From 8b5ac6498319ef5f7f3bd7a5fe9662ab964abfc4 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Sat, 24 Jun 2017 16:47:15 -0700 Subject: [PATCH] [bugfix] numeric value for date fields in table viz 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 1ae42b369aab8..77739c3ca26f9 100755 --- a/superset/viz.py +++ b/superset/viz.py @@ -353,6 +353,12 @@ def get_data(self, df): 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):