mirror of https://github.com/jumpserver/jumpserver
perf: 修改 asset get queryset
parent
96dc7db027
commit
a0563b8575
|
@ -116,7 +116,8 @@ class AssetViewSet(SuggestionMixin, OrgBulkModelViewSet):
|
|||
|
||||
def get_queryset(self):
|
||||
queryset = super().get_queryset()
|
||||
if queryset.model is not Asset:
|
||||
if queryset.model.__name__ != 'Asset':
|
||||
print("get query prefetch")
|
||||
queryset = queryset.select_related('asset_ptr')
|
||||
return queryset
|
||||
|
||||
|
|
Loading…
Reference in New Issue