Commits

Marcin Kuzminski  committed 20c0af6

user lowernames of repos for better sorting

  • Participants
  • Parent commits 7d86b61

Comments (0)

Files changed (1)

File rhodecode/controllers/admin/repos.py

 from rhodecode.model.scm import ScmModel
 from rhodecode.model.repo import RepoModel
 from rhodecode.lib.compat import json
+from sqlalchemy.sql.expression import func
 
 log = logging.getLogger(__name__)
 
         # url('repos')
 
         c.repos_list = Repository.query()\
-                        .order_by(Repository.repo_name)\
+                        .order_by(func.lower(Repository.repo_name))\
                         .all()
 
         repos_data = []
         for repo in c.repos_list:
             repos_data.append({
                 "menu": quick_menu(repo.repo_name),
-                "raw_name": repo.repo_name,
+                "raw_name": repo.repo_name.lower(),
                 "name": repo_lnk(repo.repo_name, repo.repo_type,
                                  repo.private, repo.fork),
                 "desc": repo.description,