diff --git a/README.md b/README.md index 919d8796f61e..03b45e44d159 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ under the License. Superset ========= + [![Build Status](https://travis-ci.org/apache/incubator-superset.svg?branch=master)](https://travis-ci.org/apache/incubator-superset) [![PyPI version](https://badge.fury.io/py/apache-superset.svg)](https://badge.fury.io/py/apache-superset) [![Coverage Status](https://codecov.io/github/apache/incubator-superset/coverage.svg?branch=master)](https://codecov.io/github/apache/incubator-superset) diff --git a/superset/viz.py b/superset/viz.py index 3de5e0501d6b..d6d8ca6f0599 100644 --- a/superset/viz.py +++ b/superset/viz.py @@ -475,6 +475,7 @@ def get_df_payload(self, query_obj=None, **kwargs): logger.warning("Could not cache key {}".format(cache_key)) logger.exception(ex) cache.delete(cache_key) + return { "cache_key": self._any_cache_key, "cached_dttm": self._any_cached_dttm, @@ -484,8 +485,8 @@ def get_df_payload(self, query_obj=None, **kwargs): "form_data": self.form_data, "is_cached": self._any_cache_key is not None, "query": self.query, - "from_dttm": self.from_dttm, - "to_dttm": self.to_dttm, + "from_dttm": self.from_dttm if hasattr(self, "from_dttm") else None, + "to_dttm": self.to_dttm if hasattr(self, "to_dttm") else None, "status": self.status, "stacktrace": stacktrace, "rowcount": len(df.index) if df is not None else 0,