superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: Don't cache if there's no cache key (#4229)
Date Thu, 18 Jan 2018 16:28:28 GMT
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 85d137b  Don't cache if there's no cache key (#4229)
85d137b is described below

commit 85d137b20acd4644db8f1df7e947c5d428f18fd5
Author: michellethomas <michelle.q.thomas@gmail.com>
AuthorDate: Thu Jan 18 08:28:26 2018 -0800

    Don't cache if there's no cache key (#4229)
---
 superset/viz.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/superset/viz.py b/superset/viz.py
index 65cc975..b25d074 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -282,7 +282,11 @@ class BaseViz(object):
                 data = None
                 stacktrace = traceback.format_exc()
 
-            if data and cache and self.status != utils.QueryStatus.FAILED:
+            if (
+                    data and
+                    cache_key and
+                    cache and
+                    self.status != utils.QueryStatus.FAILED):
                 cached_dttm = datetime.utcnow().isoformat().split('.')[0]
                 try:
                     cache_value = json.dumps({

-- 
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <commits@superset.apache.org>'].

Mime
View raw message