mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 15:11:27 +00:00
Merge pull request #9374 from jumpserver/pr@dev@perf_remove_cert_from_db_spec
perf: 资产的 specific 不返回加密信息
This commit is contained in:
@@ -140,7 +140,6 @@ class Asset(NodesRelationMixin, AbsConnectivity, JMSOrgBaseModel):
|
||||
if not instance:
|
||||
return []
|
||||
specific_fields = self.get_specific_fields(instance)
|
||||
specific_fields = [i for i in specific_fields if not isinstance(i, EncryptMixin)]
|
||||
info = [
|
||||
{
|
||||
'label': i.verbose_name,
|
||||
@@ -169,6 +168,7 @@ class Asset(NodesRelationMixin, AbsConnectivity, JMSOrgBaseModel):
|
||||
@staticmethod
|
||||
def get_specific_fields(instance):
|
||||
specific_fields = [i for i in instance._meta.local_fields if i.name != 'asset_ptr']
|
||||
specific_fields = [i for i in specific_fields if not isinstance(i, EncryptMixin)]
|
||||
return specific_fields
|
||||
|
||||
def get_target_ip(self):
|
||||
|
Reference in New Issue
Block a user