Merge pull request #10756 from jumpserver/pr@dev@fix_custom_asset_detail_error

perf: 修复自定义资产详情没有 auto_config 的问题
pull/10760/head
老广 1 year ago committed by GitHub
commit 09f7ddd28a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -206,15 +206,14 @@ class Asset(NodesRelationMixin, AbsConnectivity, JSONFilterMixin, JMSOrgBaseMode
@lazyproperty
def auto_config(self):
platform = self.platform
automation = self.platform.automation
auto_config = {
'su_enabled': platform.su_enabled,
'domain_enabled': platform.domain_enabled,
'ansible_enabled': False
}
automation = getattr(self.platform, 'automation', None)
if not automation:
return auto_config
auto_config.update(model_to_dict(automation))
return auto_config

Loading…
Cancel
Save