mistercrunch closed pull request #4380: [error handling] 'Time Comparison' query returns no data URL: https://github.com/apache/incubator-superset/pull/4380
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/superset/viz.py b/superset/viz.py index d66884a3b6..d9addda5f0 100644 --- a/superset/viz.py +++ b/superset/viz.py @@ -1127,10 +1127,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) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services