Skip to content

Commit

Permalink
[error handling] 'Time Comparison' query returns no data (apache#4380)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored Feb 12, 2018
1 parent 865c69d commit 100b2e3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -1130,10 +1130,11 @@ def run_extra_queries(self):
query_object['to_dttm'] -= delta

df2 = self.get_df_payload(query_object).get('df')
df2[DTTM_ALIAS] += delta
df2 = self.process_data(df2)
self.extra_chart_data = self.to_series(
df2, classed='superset', title_suffix='---')
if df2 is not None:
df2[DTTM_ALIAS] += delta
df2 = self.process_data(df2)
self.extra_chart_data = self.to_series(
df2, classed='superset', title_suffix='---')

def get_data(self, df):
df = self.process_data(df)
Expand Down

0 comments on commit 100b2e3

Please sign in to comment.