Skip to content

Commit

Permalink
json_iso_dttm_ser use for TableViz (apache#6563)
Browse files Browse the repository at this point in the history
  • Loading branch information
kakoni authored and Conglei Shi committed Jan 7, 2019
1 parent 34bce9c commit 7cd058e
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,14 +612,11 @@ def get_data(self, df):
return data

def json_dumps(self, obj, sort_keys=False):
if self.form_data.get('all_columns'):
return json.dumps(
obj,
default=utils.json_iso_dttm_ser,
sort_keys=sort_keys,
ignore_nan=True)
else:
return super(TableViz, self).json_dumps(obj)
return json.dumps(
obj,
default=utils.json_iso_dttm_ser,
sort_keys=sort_keys,
ignore_nan=True)


class TimeTableViz(BaseViz):
Expand Down

0 comments on commit 7cd058e

Please sign in to comment.