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):