Skip to content

Commit

Permalink
bugfix[cherry-pick]: 修复搜索页无法正常展示应用的问题 (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
shabbywu authored Sep 21, 2023
1 parent 0965844 commit 2bb5378
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apiserver/paasng/paasng/accessories/search/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from rest_framework.viewsets import ViewSet

from paasng.platform.applications.models import UserApplicationFilter
from paasng.publish.entrance.exposer import get_exposed_links

from .backends import BKDocumentSearcher, MixSearcher
from .serializers import AppSearchResultSLZ, DocSearchResultSLZ, DocumentSearchWordSLZ, DocumentSLZ, UniversalSearchSLZ
Expand Down Expand Up @@ -73,6 +74,9 @@ def search(self, request):
include_inactive=True, order_by=['name'], search_term=slz.data['keyword']
)
paged_applications = self.paginator.paginate_queryset(applications, self.request, view=self)
# Set exposed links property, to be used by the serializer later
for app in paged_applications:
app._deploy_info = get_exposed_links(app)
return Response(AppSearchResultSLZ({'results': paged_applications, 'count': applications.count()}).data)


Expand Down

0 comments on commit 2bb5378

Please sign in to comment.