mirror of https://github.com/jumpserver/jumpserver
perf: 接口 /api/v1/assets/domains/ sql优化
parent
09f7ddd28a
commit
a8ef405939
|
@ -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