From 1249935bab51620f059b754df17e5b345a230848 Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 12 Sep 2023 19:57:03 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=A1=B9=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/locale/ja/LC_MESSAGES/django.mo | 4 ++-- apps/locale/zh/LC_MESSAGES/django.mo | 4 ++-- apps/perms/utils/account.py | 1 - apps/users/const.py | 2 +- apps/users/serializers/preference/luna.py | 6 +++--- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/apps/locale/ja/LC_MESSAGES/django.mo b/apps/locale/ja/LC_MESSAGES/django.mo index 8d72b8d8d..0c33a92a2 100644 --- a/apps/locale/ja/LC_MESSAGES/django.mo +++ b/apps/locale/ja/LC_MESSAGES/django.mo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:169429c30eafe151b854fb90b3f7ea88d8778606f1a71155ac12329e3cfc17ae -size 157506 +oid sha256:3395e38080658c98fa14883daffb30b33117ef08fbd07e45d103d20ba2ff3a5d +size 159235 diff --git a/apps/locale/zh/LC_MESSAGES/django.mo b/apps/locale/zh/LC_MESSAGES/django.mo index 06f8fb0f8..915a69822 100644 --- a/apps/locale/zh/LC_MESSAGES/django.mo +++ b/apps/locale/zh/LC_MESSAGES/django.mo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f2e0f4a3b01d7b23f7c92b4d7be7a422b5c024b0115ae0b465562547eecf2979 -size 128958 +oid sha256:49028b9f116c7ecf67d86363cb6728ddf97511503c4528a04c641920a878565d +size 130118 diff --git a/apps/perms/utils/account.py b/apps/perms/utils/account.py index 303e3ad22..d66338a2c 100644 --- a/apps/perms/utils/account.py +++ b/apps/perms/utils/account.py @@ -41,7 +41,6 @@ class PermAccountUtil(AssetPermissionUtil): alias_date_expired_mapper[alias].append(perm.date_expired) asset_accounts = asset.accounts.all().active() - # username_accounts_mapper = {account.username: account for account in asset_accounts} username_accounts_mapper = defaultdict(list) for account in asset_accounts: username_accounts_mapper[account.username].append(account) diff --git a/apps/users/const.py b/apps/users/const.py index 4929f58bd..cc8d03b2d 100644 --- a/apps/users/const.py +++ b/apps/users/const.py @@ -43,7 +43,7 @@ class KeyboardLayout(TextChoices): TR_TR_QWERTY = 'tr-tr-qwerty', 'Turkish-Q (Qwerty)' -class RemoteApplicationConnectionMethod(TextChoices): +class AppletConnectionMethod(TextChoices): WEB = 'web', _('Web') CLIENT = 'client', _('Client') diff --git a/apps/users/serializers/preference/luna.py b/apps/users/serializers/preference/luna.py index a6ee02da9..68046ab2e 100644 --- a/apps/users/serializers/preference/luna.py +++ b/apps/users/serializers/preference/luna.py @@ -3,7 +3,7 @@ import json from django.utils.translation import gettext_lazy as _ from rest_framework import serializers -from users.const import RDPResolution, KeyboardLayout, RDPClientOption, RemoteApplicationConnectionMethod +from users.const import RDPResolution, KeyboardLayout, RDPClientOption, AppletConnectionMethod class MultipleChoiceField(serializers.MultipleChoiceField): @@ -37,8 +37,8 @@ class GraphicsSerializer(serializers.Serializer): choices=RDPClientOption.choices, default={RDPClientOption.FULL_SCREEN}, label=_('RDP client option'), required=False ) - remote_application_connection_method = serializers.ChoiceField( - RemoteApplicationConnectionMethod.choices, default=RemoteApplicationConnectionMethod.WEB, + applet_connection_method = serializers.ChoiceField( + AppletConnectionMethod.choices, default=AppletConnectionMethod.WEB, required=False, label=_('Remote application connection method') )