From b50fd3eab066b6eca7b77c172ff0cdc840604023 Mon Sep 17 00:00:00 2001 From: Shuyao Bi Date: Fri, 15 Jan 2021 14:09:06 -0800 Subject: [PATCH] Fix 500 error when loading dashboards with slice having deleted dataset (#12535) --- superset/models/dashboard.py | 1 + 1 file changed, 1 insertion(+) diff --git a/superset/models/dashboard.py b/superset/models/dashboard.py index d3a8363dce..d7c2a6978a 100644 --- a/superset/models/dashboard.py +++ b/superset/models/dashboard.py @@ -237,6 +237,7 @@ class Dashboard( # pylint: disable=too-many-instance-attributes # Filter out unneeded fields from the datasource payload datasource.uid: datasource.data_for_slices(slices) for datasource, slices in datasource_slices.items() + if datasource }, }