Skip to content

Commit

Permalink
[cache] Ensuring that the datasource UID is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
john-bodley committed Mar 12, 2018
1 parent b63dc91 commit 26257d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion superset/viz.py
Expand Up @@ -276,9 +276,10 @@ def cache_key(self, query_obj):
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()

Expand Down

0 comments on commit 26257d9

Please sign in to comment.