mirror of https://github.com/apache/superset.git
[cache] Ensuring that the datasource UID is defined
This commit is contained in:
parent
b63dc91cd1
commit
26257d94f5
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue