diff --git a/apps/assets/api/asset/asset.py b/apps/assets/api/asset/asset.py index bfac3ec1c..fe6dca890 100644 --- a/apps/assets/api/asset/asset.py +++ b/apps/assets/api/asset/asset.py @@ -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