mirror of https://github.com/jumpserver/jumpserver
perf: 用户详情页-资产授权规则字段排序优化
parent
e8d717d174
commit
29dbc2e4d4
|
@ -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…
Reference in New Issue