This is an automated email from the ASF dual-hosted git repository. suddjian pushed a commit to branch dashboard-dataset-endpoint in repository https://gitbox.apache.org/repos/asf/superset.git
commit 6faba7c46b0a81d544101ec712f8545efa1e623d Author: David Aaron Suddjian <[email protected]> AuthorDate: Wed Mar 10 13:31:11 2021 -0800 list instead of map --- superset/dashboards/dao.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/superset/dashboards/dao.py b/superset/dashboards/dao.py index 140bee9..0951f47 100644 --- a/superset/dashboards/dao.py +++ b/superset/dashboards/dao.py @@ -59,7 +59,7 @@ class DashboardDAO(BaseDAO): return dashboard @staticmethod - def get_datasets_for_dashboard(id_or_slug: str) -> Dict[str, Any]: + def get_datasets_for_dashboard(id_or_slug: str) -> List[Any]: query = ( db.session.query(Dashboard) .filter(id_or_slug_filter(id_or_slug)) @@ -74,11 +74,11 @@ class DashboardDAO(BaseDAO): if not dashboard: raise DashboardNotFoundError() datasource_slices = core.indexed(dashboard.slices, "datasource") - data = { - datasource.uid: datasource.data_for_slices(slices) + data = [ + datasource.data_for_slices(slices) for datasource, slices in datasource_slices.items() if datasource - } + ] return data @staticmethod
