Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: I think it may be better to init self.from_dttm = None in the constructor of BaseViz, initializing all the attrs that may get assigned in the lifecycle of the object there

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit accepted. I need to close + reopen this PR again anyway because Travis won't play nice.

"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,
Expand Down