Skip to content

Commit

Permalink
Fix markup broken since cache related changes (apache#4396)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored and michellethomas committed May 23, 2018
1 parent f894105 commit f99820e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,12 @@ def cache_key(self, query_obj):
def get_payload(self, query_obj=None):
"""Returns a payload of metadata and data"""
payload = self.get_df_payload(query_obj)
df = payload['df']
if df is not None:
payload['data'] = self.get_data(df)

df = payload.get('df')
if df is not None and len(df.index) == 0:
raise Exception('No data')
payload['data'] = self.get_data(df)

del payload['df']
return payload

Expand Down

0 comments on commit f99820e

Please sign in to comment.