diff --git a/.gitignore b/.gitignore index ecbb47960..70ca32392 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ logs/* release/* releashe /apps/script.py +xpack.bak diff --git a/apps/assets/migrations/0099_auto_20220426_1558.py b/apps/assets/migrations/0099_auto_20220426_1558.py index a42837899..a3418aea8 100644 --- a/apps/assets/migrations/0099_auto_20220426_1558.py +++ b/apps/assets/migrations/0099_auto_20220426_1558.py @@ -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( diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po index da8f978d8..bed4517ce 100644 --- a/apps/locale/zh/LC_MESSAGES/django.po +++ b/apps/locale/zh/LC_MESSAGES/django.po @@ -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 ""