1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 14:50:29 +00:00

Merge pull request #1935 from haiwen/virtual-repo

update get_unencry_rw_repos_by_user
This commit is contained in:
xiez
2017-12-09 14:21:27 +08:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -269,6 +269,9 @@ def get_unencry_rw_repos_by_user(request):
accessible_repos = [] accessible_repos = []
for r in owned_repos: for r in owned_repos:
if r.is_virtual:
continue
if not has_repo(accessible_repos, r) and not r.encrypted: if not has_repo(accessible_repos, r) and not r.encrypted:
accessible_repos.append(r) accessible_repos.append(r)

View File

@@ -190,7 +190,6 @@ def unenc_rw_repos(request):
acc_repos = get_unencry_rw_repos_by_user(request) acc_repos = get_unencry_rw_repos_by_user(request)
repo_list = [] repo_list = []
acc_repos = filter(lambda r: not r.is_virtual, acc_repos)
for repo in acc_repos: for repo in acc_repos:
repo_list.append({"name": repo.name, "id": repo.id}) repo_list.append({"name": repo.name, "id": repo.id})