소스 검색

HUE-8026 [indexer] Properly sort the list of indexes

Romain Rigaux 7 년 전
부모
커밋
08b1c4b
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      desktop/libs/indexer/src/indexer/solr_client.py

+ 2 - 1
desktop/libs/indexer/src/indexer/solr_client.py

@@ -89,7 +89,8 @@ class SolrClient(object):
       LOG.warn(msg)
       raise PopupException(msg, detail=smart_str(e))
 
-    return indexes
+    return sorted(indexes, key=lambda index: index['name'])
+
 
   def create_index(self, name, fields, config_name=None, unique_key_field=None, df=None, shards=1, replication=1):
     if self.is_solr_cloud_mode():