pull/8605/head
ibuler 2022-06-16 11:32:36 +08:00
parent cc167f1b49
commit e2f199606e
3 changed files with 6 additions and 5 deletions

1
.gitignore vendored
View File

@ -40,3 +40,4 @@ logs/*
release/*
releashe
/apps/script.py
xpack.bak

View File

@ -71,7 +71,6 @@ def migrate_database_to_asset(apps, *args):
except:
failed_apps.append(app)
pass
# db.hostname = 'DB-' + db.hostname
def migrate_remote_app_to_asset(apps, *args):
@ -154,11 +153,11 @@ def create_app_nodes(apps, org_id):
if not node_keys:
return
node_key_split = [key.split(':') for key in node_keys]
next_value = int(max([k[1] for k in node_key_split])) + 1
next_value = max([int(k[1]) for k in node_key_split]) + 1
parent_key = node_key_split[0][0]
parent = node_model.objects.get(key=parent_key)
next_key = '{}:{}'.format(node_key_split[0][0], next_value)
next_key = '{}:{}'.format(parent_key, next_value)
name = 'Apps'
parent = node_model.objects.get(key=parent_key)
full_value = parent.full_value + '/' + name
defaults = {
'key': next_key, 'value': name, 'parent_key': parent_key,
@ -176,6 +175,7 @@ def migrate_to_nodes(apps, *args):
asset_model = apps.get_model('assets', 'Asset')
orgs = org_model.objects.all()
# Todo: 优化一些
for org in orgs:
node = create_app_nodes(apps, org.id)
assets = asset_model.objects.filter(

View File

@ -6157,7 +6157,7 @@ msgstr "启用 MFA(OTP)"
#: users/templates/users/user_otp_enable_bind.html:6
msgid "Bind one-time password authenticator"
msgstr "绑定MFA验证器"
msgstr "绑定 MFA 验证器"
#: users/templates/users/user_otp_enable_bind.html:13
msgid ""