Skip to content

Commit

Permalink
fix: make dataset list sort case insensitive (apache#14528)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored May 24, 2021
1 parent fafd533 commit 865428a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion superset/views/chart/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ def add(self) -> FlaskResponse:
for d in ConnectorRegistry.get_all_datasources(db.session)
]
payload = {
"datasources": sorted(datasources, key=lambda d: d["label"]),
"datasources": sorted(
datasources,
key=lambda d: d["label"].lower() if isinstance(d["label"], str) else "",
),
"common": common_bootstrap_payload(),
"user": bootstrap_user_data(g.user),
}
Expand Down

0 comments on commit 865428a

Please sign in to comment.