fix: make dataset list sort case insensitive (#14528)

This commit is contained in:
Maxime Beauchemin 2021-05-24 14:08:13 -07:00 committed by GitHub
parent 65f90096fd
commit 4d3fb56e11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,10 @@ class SliceModelView(
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),
}