[hotfix] dashboard fails when a slice is missing its datasource

This commit is contained in:
Maxime Beauchemin 2017-04-05 18:52:17 +00:00
parent 10773f96a7
commit b7f46ebe75

View File

@ -1620,7 +1620,7 @@ class Superset(BaseSupersetView):
dash = qry.one()
datasources = {slc.datasource for slc in dash.slices}
for datasource in datasources:
if not self.datasource_access(datasource):
if datasource and not self.datasource_access(datasource):
flash(
__(get_datasource_access_error_msg(datasource.name)),
"danger")