From 26257d94f5f43a5d3b745c1b08a29cc40980f211 Mon Sep 17 00:00:00 2001 From: John Bodley Date: Wed, 7 Mar 2018 23:29:23 -0800 Subject: [PATCH] [cache] Ensuring that the datasource UID is defined --- superset/viz.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/superset/viz.py b/superset/viz.py index 9225e5da8f..36696bd317 100644 --- a/superset/viz.py +++ b/superset/viz.py @@ -276,9 +276,10 @@ class BaseViz(object): for k in ['from_dttm', 'to_dttm']: del cache_dict[k] - for k in ['since', 'until', 'datasource']: + for k in ['since', 'until']: cache_dict[k] = self.form_data.get(k) + cache_dict['datasource'] = self.datasource.uid json_data = self.json_dumps(cache_dict, sort_keys=True) return hashlib.md5(json_data.encode('utf-8')).hexdigest()