mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-18 23:18:27 +00:00
filter out wiki repos (#7608)
This commit is contained in:
parent
578ede3e87
commit
bab0d71302
@ -41,7 +41,7 @@ from seahub.wopi.utils import get_wopi_dict
|
|||||||
from seahub.api2.base import APIView
|
from seahub.api2.base import APIView
|
||||||
from seahub.api2.models import TokenV2, DESKTOP_PLATFORMS
|
from seahub.api2.models import TokenV2, DESKTOP_PLATFORMS
|
||||||
from seahub.api2.endpoints.group_owned_libraries import get_group_id_by_repo_owner
|
from seahub.api2.endpoints.group_owned_libraries import get_group_id_by_repo_owner
|
||||||
from seahub.api2.utils import get_search_repos
|
from seahub.api2.utils import get_search_repos, is_wiki_repo
|
||||||
from seahub.avatar.templatetags.avatar_tags import api_avatar_url, avatar
|
from seahub.avatar.templatetags.avatar_tags import api_avatar_url, avatar
|
||||||
from seahub.avatar.templatetags.group_avatar_tags import api_grp_avatar_url, \
|
from seahub.avatar.templatetags.group_avatar_tags import api_grp_avatar_url, \
|
||||||
grp_avatar
|
grp_avatar
|
||||||
@ -858,6 +858,9 @@ class Repos(APIView):
|
|||||||
if r.is_virtual:
|
if r.is_virtual:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if is_wiki_repo(r):
|
||||||
|
continue
|
||||||
|
|
||||||
if q and q.lower() not in r.name.lower():
|
if q and q.lower() not in r.name.lower():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -914,6 +917,10 @@ class Repos(APIView):
|
|||||||
|
|
||||||
shared_repos.sort(key=lambda x: x.last_modify, reverse=True)
|
shared_repos.sort(key=lambda x: x.last_modify, reverse=True)
|
||||||
for r in shared_repos:
|
for r in shared_repos:
|
||||||
|
|
||||||
|
if is_wiki_repo(r):
|
||||||
|
continue
|
||||||
|
|
||||||
if q and q.lower() not in r.name.lower():
|
if q and q.lower() not in r.name.lower():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -979,6 +986,10 @@ class Repos(APIView):
|
|||||||
nickname_dict[e] = email2nickname(e)
|
nickname_dict[e] = email2nickname(e)
|
||||||
|
|
||||||
for r in group_repos:
|
for r in group_repos:
|
||||||
|
|
||||||
|
if is_wiki_repo(r):
|
||||||
|
continue
|
||||||
|
|
||||||
if q and q.lower() not in r.name.lower():
|
if q and q.lower() not in r.name.lower():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -1024,6 +1035,10 @@ class Repos(APIView):
|
|||||||
nickname_dict[e] = email2nickname(e)
|
nickname_dict[e] = email2nickname(e)
|
||||||
|
|
||||||
for r in public_repos:
|
for r in public_repos:
|
||||||
|
|
||||||
|
if is_wiki_repo(r):
|
||||||
|
continue
|
||||||
|
|
||||||
if q and q.lower() not in r.name.lower():
|
if q and q.lower() not in r.name.lower():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user