perf: 优化 acl 默认排序和manager

This commit is contained in:
ibuler
2023-06-12 13:59:54 +08:00
committed by Jiangjie.Bai
parent fc90ced2b0
commit dc35a8c52b
6 changed files with 38 additions and 25 deletions

View File

@@ -43,7 +43,7 @@ class LoginAssetCheckAPI(CreateAPIView):
queryset = queryset.filter(accounts__contains=account_username)
with tmp_to_org(self.serializer.asset.org):
acl = queryset.order_by('priority').valid().first()
acl = queryset.valid().first()
if acl:
need_review = True