This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new ae7a9dc  Fix markup broken since cache related changes (#4396)
ae7a9dc is described below

commit ae7a9dc63da4f4190b777e3eb7bca5d5c1a77677
Author: Maxime Beauchemin <maximebeauche...@gmail.com>
AuthorDate: Fri Feb 9 15:55:45 2018 -0800

    Fix markup broken since cache related changes (#4396)
---
 superset/viz.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/superset/viz.py b/superset/viz.py
index 4ab345c..6149b6f 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -286,9 +286,12 @@ class BaseViz(object):
     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
 

-- 
To stop receiving notification emails like this one, please contact
maximebeauche...@apache.org.

Reply via email to