Skip to content

Commit

Permalink
fix: Volatile datasource ordering in dashboard export (#19595)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael S. Molina <[email protected]>
(cherry picked from commit bfe55b9)
  • Loading branch information
pnadolny13 authored and michael-s-molina committed Mar 22, 2024
1 parent 336f6bd commit 90afb34
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion superset/models/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 90afb34

Please sign in to comment.