perf: 修改 asset get queryset

pull/14806/head
ibuler 2025-01-10 11:04:44 +08:00
parent 96dc7db027
commit a0563b8575
1 changed files with 2 additions and 1 deletions

View File

@ -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