perf: 平台协议支持更改 public 字段

pull/10425/head
Bai 2023-05-10 16:46:10 +08:00
parent ebb0e796ce
commit 42abad75d9
1 changed files with 0 additions and 8 deletions

View File

@ -26,14 +26,6 @@ class PlatformProtocol(models.Model):
def secret_types(self):
return Protocol.settings().get(self.name, {}).get('secret_types', ['password'])
def set_public(self):
private_protocol_set = ('winrm',)
self.public = self.name not in private_protocol_set
def save(self, **kwargs):
self.set_public()
return super().save(**kwargs)
class PlatformAutomation(models.Model):
ansible_enabled = models.BooleanField(default=False, verbose_name=_("Enabled"))