Browse Source

perf: 用户详情页-资产授权规则字段排序优化

pull/13052/head
wangruidong 7 months ago committed by w940853815
parent
commit
29dbc2e4d4
  1. 4
      apps/perms/serializers/permission.py

4
apps/perms/serializers/permission.py

@ -190,8 +190,8 @@ class AssetPermissionListSerializer(AssetPermissionSerializer):
class Meta(AssetPermissionSerializer.Meta):
amount_fields = ["users_amount", "user_groups_amount", "assets_amount", "nodes_amount"]
remove_fields = {"users", "assets", "nodes", "user_groups"}
fields = list(set(AssetPermissionSerializer.Meta.fields + amount_fields) - remove_fields)
fields = [item for item in (AssetPermissionSerializer.Meta.fields + amount_fields) if
item not in ["users", "assets", "nodes", "user_groups"]]
@classmethod
def setup_eager_loading(cls, queryset):

Loading…
Cancel
Save