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 d85cd5a  [error handling] 'Time Comparison' query returns no data 
(#4380)
d85cd5a is described below

commit d85cd5a972bdcc14dd84259980b1dfbf97f8d4ab
Author: Maxime Beauchemin <maximebeauche...@gmail.com>
AuthorDate: Mon Feb 12 11:48:14 2018 -0800

    [error handling] 'Time Comparison' query returns no data (#4380)
---
 superset/viz.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/superset/viz.py b/superset/viz.py
index 6149b6f..5c36e40 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -1130,10 +1130,11 @@ class NVD3TimeSeriesViz(NVD3Viz):
             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)

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

Reply via email to