mirror of https://github.com/jumpserver/jumpserver
fit2bot
1 year ago
committed by
GitHub
1 changed files with 24 additions and 0 deletions
@ -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