mirror of
https://github.com/apache/superset.git
synced 2024-09-12 16:49:40 -04:00
Merge pull request #4573 from john-bodley/john-bodley-cache-fix-datasource-uid
[cache] Ensuring that the datasource UID is defined
This commit is contained in:
commit
de4409835e
@ -277,9 +277,10 @@ class BaseViz(object):
|
|||||||
for k in ['from_dttm', 'to_dttm']:
|
for k in ['from_dttm', 'to_dttm']:
|
||||||
del cache_dict[k]
|
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[k] = self.form_data.get(k)
|
||||||
|
|
||||||
|
cache_dict['datasource'] = self.datasource.uid
|
||||||
json_data = self.json_dumps(cache_dict, sort_keys=True)
|
json_data = self.json_dumps(cache_dict, sort_keys=True)
|
||||||
return hashlib.md5(json_data.encode('utf-8')).hexdigest()
|
return hashlib.md5(json_data.encode('utf-8')).hexdigest()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user