You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2021/05/24 21:09:17 UTC

[superset] branch master updated: fix: make dataset list sort case insensitive (#14528)

This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 4d3fb56  fix: make dataset list sort case insensitive (#14528)
4d3fb56 is described below

commit 4d3fb56e11b690b65d9150e1fb7282acb464f110
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Mon May 24 14:08:13 2021 -0700

    fix: make dataset list sort case insensitive (#14528)
---
 superset/views/chart/views.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/superset/views/chart/views.py b/superset/views/chart/views.py
index 233d6a8..e4fedac 100644
--- a/superset/views/chart/views.py
+++ b/superset/views/chart/views.py
@@ -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),
         }