mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-09 19:29:48 +00:00
perf: 账号生成时,排除 [ 开头的
This commit is contained in:
@@ -47,11 +47,9 @@ class UserGroupGrantedAssetsApi(ListAPIView):
|
||||
|
||||
granted_q |= Q(granted_by_permissions__id__in=asset_perm_ids)
|
||||
|
||||
assets = Asset.objects.filter(
|
||||
granted_q
|
||||
).distinct().only(
|
||||
*self.only_fields
|
||||
)
|
||||
assets = Asset.objects.filter(granted_q) \
|
||||
.only(*self.only_fields) \
|
||||
.distinct()
|
||||
return assets
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user