perf: 优化资产授权规则过滤支持 accounts

This commit is contained in:
Bai
2023-02-03 15:01:31 +08:00
committed by Jiangjie.Bai
parent d2ae6642eb
commit ce8ad5f9cc
3 changed files with 16 additions and 2 deletions

View File

@@ -72,6 +72,10 @@ class AssetPermissionSerializer(BulkOrgResourceModelSerializer):
return
actions.default = list(actions.choices.keys())
@staticmethod
def validate_accounts(accounts):
return list(set(accounts))
@classmethod
def setup_eager_loading(cls, queryset):
"""Perform necessary eager loading of data."""