mirror of https://github.com/jumpserver/jumpserver
perf: 修复自定义资产详情没有 auto_config 的问题
parent
f13966e061
commit
da4337168f
|
@ -206,15 +206,14 @@ class Asset(NodesRelationMixin, AbsConnectivity, JSONFilterMixin, JMSOrgBaseMode
|
||||||
@lazyproperty
|
@lazyproperty
|
||||||
def auto_config(self):
|
def auto_config(self):
|
||||||
platform = self.platform
|
platform = self.platform
|
||||||
automation = self.platform.automation
|
|
||||||
auto_config = {
|
auto_config = {
|
||||||
'su_enabled': platform.su_enabled,
|
'su_enabled': platform.su_enabled,
|
||||||
'domain_enabled': platform.domain_enabled,
|
'domain_enabled': platform.domain_enabled,
|
||||||
'ansible_enabled': False
|
'ansible_enabled': False
|
||||||
}
|
}
|
||||||
|
automation = getattr(self.platform, 'automation', None)
|
||||||
if not automation:
|
if not automation:
|
||||||
return auto_config
|
return auto_config
|
||||||
|
|
||||||
auto_config.update(model_to_dict(automation))
|
auto_config.update(model_to_dict(automation))
|
||||||
return auto_config
|
return auto_config
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue