perf: 优化授权的资产,速度快 10 倍

This commit is contained in:
ibuler
2024-01-24 15:41:03 +08:00
committed by 老广
parent 34aa48d18c
commit e8bbc44647
5 changed files with 21 additions and 24 deletions

View File

@@ -38,7 +38,7 @@ class UserPermedAssetRetrieveApi(SelfOrPKUserMixin, RetrieveAPIView):
class BaseUserPermedAssetsApi(SelfOrPKUserMixin, ListAPIView):
ordering = ('name',)
ordering = []
search_fields = ('name', 'address', 'comment')
ordering_fields = ("name", "address")
filterset_class = AssetFilterSet