diff --git a/superset/models/dashboard.py b/superset/models/dashboard.py index 5570e892ff7d6..0a0d789c7a947 100644 --- a/superset/models/dashboard.py +++ b/superset/models/dashboard.py @@ -365,8 +365,11 @@ def export_dashboards( # pylint: disable=too-many-locals copied_dashboard.alter_params(remote_id=dashboard_id) copied_dashboards.append(copied_dashboard) + datasource_id_list = list(datasource_ids) + datasource_id_list.sort() + eager_datasources = [] - for datasource_id, _ in datasource_ids: + for datasource_id, _ in datasource_id_list: eager_datasource = SqlaTable.get_eager_sqlatable_datasource(datasource_id) copied_datasource = eager_datasource.copy() copied_datasource.alter_params(