Changeset - f3417f0d54b5
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-05-28 16:52:13
marcin@python-works.com
fixed default sorting on main page with sorting using wrapped lower() call on database level
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/model/scm.py
Show inline comments
 
@@ -25,12 +25,14 @@
 
import os
 
import time
 
import traceback
 
import logging
 
import cStringIO
 

	
 
from sqlalchemy import func
 

	
 
from rhodecode.lib.vcs import get_backend
 
from rhodecode.lib.vcs.exceptions import RepositoryError
 
from rhodecode.lib.vcs.utils.lazy import LazyProperty
 
from rhodecode.lib.vcs.nodes import FileNode
 

	
 
from rhodecode import BACKENDS
 
@@ -220,13 +222,13 @@ class ScmModel(BaseModel):
 
        :param all_repos: list of repository names as strings
 
            give specific repositories list, good for filtering
 
        """
 
        if all_repos is None:
 
            all_repos = self.sa.query(Repository)\
 
                        .filter(Repository.group_id == None)\
 
                        .order_by(Repository.repo_name).all()
 
                        .order_by(func.lower(Repository.repo_name)).all()
 

	
 
        repo_iter = CachedRepoList(all_repos, repos_path=self.repos_path,
 
                                   order_by=sort_key)
 

	
 
        return repo_iter
 

	
0 comments (0 inline, 0 general)