mirror of https://github.com/jumpserver/jumpserver
parent
d182d14e26
commit
93ba4443dd
|
@ -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…
Reference in New Issue