mirror of https://github.com/jumpserver/jumpserver
perf: 优化一下
parent
c6071740b1
commit
1e0a6b5072
|
@ -16,9 +16,7 @@ class DeviceTypes(BaseType):
|
|||
'charset_enabled': False,
|
||||
'domain_enabled': True,
|
||||
'su_enabled': True,
|
||||
'su_methods': [
|
||||
{'name': 'enable', 'id': 'enable'},
|
||||
]
|
||||
'su_methods': ['enable']
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,10 +19,7 @@ class HostTypes(BaseType):
|
|||
'charset': 'utf-8', # default
|
||||
'domain_enabled': True,
|
||||
'su_enabled': True,
|
||||
'su_methods': [
|
||||
{'name': 'sudo su -', 'id': 'sudo'},
|
||||
{'name': 'su -', 'id': 'su'}
|
||||
],
|
||||
'su_methods': ['sudo', 'su'],
|
||||
},
|
||||
cls.WINDOWS: {
|
||||
'su_enabled': False,
|
||||
|
|
|
@ -14,6 +14,8 @@ def migrate_platform_protocol_primary(apps, schema_editor):
|
|||
|
||||
for platform in platforms:
|
||||
p = platform.protocols.first()
|
||||
if not p:
|
||||
continue
|
||||
p.primary = True
|
||||
p.save()
|
||||
|
||||
|
|
Loading…
Reference in New Issue