mirror of https://github.com/jumpserver/jumpserver
Merge pull request #10756 from jumpserver/pr@dev@fix_custom_asset_detail_error
perf: 修复自定义资产详情没有 auto_config 的问题pull/10760/head
commit
09f7ddd28a
|
@ -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…
Reference in New Issue