mirror of https://github.com/jumpserver/jumpserver
Merge pull request #10760 from jumpserver/pr@dev@perf_assets_domain
perf: 接口 /api/v1/assets/domains/ sql优化pull/10770/head
commit
db12bc07e8
|
@ -26,6 +26,8 @@ class DomainViewSet(OrgBulkModelViewSet):
|
|||
return serializers.DomainWithGatewaySerializer
|
||||
return serializers.DomainSerializer
|
||||
|
||||
def get_queryset(self):
|
||||
return super().get_queryset().prefetch_related('assets')
|
||||
|
||||
class GatewayViewSet(HostViewSet):
|
||||
perm_model = Gateway
|
||||
|
|
Loading…
Reference in New Issue