perf: windows ssh 协议 默认开启 (#11158)

Co-authored-by: feng <1304903146@qq.com>
pull/11168/head
fit2bot 1 year ago committed by GitHub
parent d182d14e26
commit 93ba4443dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,24 @@
# Generated by Django 4.1.10 on 2023-08-01 11:40
from django.db import migrations
def windows_platform_protocols_ssh_default(apps, schema_editor):
platform_cls = apps.get_model('assets', 'Platform')
windows_platform = platform_cls.objects.filter(
name='Windows', internal=True, type='windows'
).first()
if not windows_platform:
return
windows_platform.protocols.filter(name='ssh').update(default=True)
class Migration(migrations.Migration):
dependencies = [
('assets', '0121_auto_20230725_1458'),
]
operations = [
migrations.RunPython(windows_platform_protocols_ssh_default)
]
Loading…
Cancel
Save