diff --git a/superset/viz.py b/superset/viz.py index 6778c3511ea05..19ff165e26a15 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):