From 60fcf5fcd33a30b2edb518a364c3673f5a8140e5 Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Thu, 15 Aug 2024 17:41:58 +0800 Subject: [PATCH] perf: luna connect asset name set custom value --- apps/perms/utils/asset_perm.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/perms/utils/asset_perm.py b/apps/perms/utils/asset_perm.py index 6de84121f..d368e0286 100644 --- a/apps/perms/utils/asset_perm.py +++ b/apps/perms/utils/asset_perm.py @@ -2,7 +2,7 @@ from collections import defaultdict from accounts.const import AliasAccount from accounts.models import VirtualAccount -from assets.models import Asset +from assets.models import Asset, MyAsset from common.utils import lazyproperty from orgs.utils import tmp_to_org, tmp_to_root_org from .permission import AssetPermissionUtil @@ -26,7 +26,9 @@ class PermAssetDetailUtil: @lazyproperty def asset(self): if self.user_asset_perms: - return self._asset + asset = self._asset + MyAsset.set_asset_custom_value([asset], self.user) + return asset raise Asset.DoesNotExist() @lazyproperty