1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-10-21 10:51:17 +00:00

improve search

This commit is contained in:
lins05
2013-03-15 13:59:27 +08:00
parent 4f47828d64
commit cc1193148f

View File

@@ -840,10 +840,10 @@ if getattr(settings, 'ENABLE_FILE_SEARCH', False):
repo.name = repo.repo_name repo.name = repo.repo_name
pubrepo_id_map[repo.id] = repo pubrepo_id_map[repo.id] = repo
# get a list of pure non-pub repos # remove duplicates from non-pub repos
nonpub_repo_list = [] nonpub_repo_list = []
for repo in owned_repos + shared_repos + groups_repos: for repo in owned_repos + shared_repos + groups_repos:
if repo.id not in pubrepo_id_map: if repo.id not in nonpub_repo_list:
nonpub_repo_list.append(repo) nonpub_repo_list.append(repo)
nonpub_repo_ids = [ repo.id for repo in nonpub_repo_list ] nonpub_repo_ids = [ repo.id for repo in nonpub_repo_list ]