mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
[dashboard] fix missing datasource issue (#2718)
Addresses a bug that happens when rendering a dashboard for which a datasource behind one of the slices has been deleted
This commit is contained in:
parent
fffb7b500a
commit
5929ab7689
@ -1629,7 +1629,12 @@ class Superset(BaseSupersetView):
|
||||
qry = qry.filter_by(slug=dashboard_id)
|
||||
|
||||
dash = qry.one()
|
||||
datasources = {slc.datasource for slc in dash.slices}
|
||||
datasources = set()
|
||||
for slc in dash.slices:
|
||||
datasource = slc.datasource
|
||||
if datasource:
|
||||
datasources.add(datasource)
|
||||
|
||||
for datasource in datasources:
|
||||
if datasource and not self.datasource_access(datasource):
|
||||
flash(
|
||||
|
Loading…
Reference in New Issue
Block a user