fix: 更新平台 ansible_enabled 未设置 (#10210)

Co-authored-by: feng <1304903146@qq.com>
pull/10211/head
fit2bot 2023-04-14 17:10:33 +08:00 committed by GitHub
parent e0f077b054
commit b1374c6aba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -168,7 +168,7 @@ class PlatformSerializer(WritableNestedModelSerializer):
su_enabled = attrs.get('su_enabled', False) and self.constraints.get('su_enabled', False)
automation = attrs.get('automation', {})
automation['ansible_enabled'] = automation.get('ansible_enabled', False) \
and self.constraints.get('ansible_enabled', False)
and self.constraints['automation'].get('ansible_enabled', False)
attrs.update({
'domain_enabled': domain_enabled,
'su_enabled': su_enabled,