mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-01 23:47:40 +00:00
feat: 添加组件类型 razor 并替换 XRDP_ENABLED
This commit is contained in:
23
apps/settings/migrations/0006_remove_setting_enabled.py
Normal file
23
apps/settings/migrations/0006_remove_setting_enabled.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 3.1.14 on 2022-06-06 09:45
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def migrate_terminal_razor_enabled(apps, schema_editor):
|
||||
setting_model = apps.get_model("settings", "Setting")
|
||||
s = setting_model.objects.filter(name='XRDP_ENABLED').first()
|
||||
if not s:
|
||||
return
|
||||
s.name = 'TERMINAL_RAZOR_ENABLED'
|
||||
s.save()
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('settings', '0005_auto_20220310_0616'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(migrate_terminal_razor_enabled),
|
||||
]
|
Reference in New Issue
Block a user