perf: 优化设置项名称

pull/11548/head
ibuler 2023-09-12 19:57:03 +08:00 committed by 老广
parent 5fa1ae9ee5
commit 1249935bab
5 changed files with 8 additions and 9 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:169429c30eafe151b854fb90b3f7ea88d8778606f1a71155ac12329e3cfc17ae
size 157506
oid sha256:3395e38080658c98fa14883daffb30b33117ef08fbd07e45d103d20ba2ff3a5d
size 159235

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f2e0f4a3b01d7b23f7c92b4d7be7a422b5c024b0115ae0b465562547eecf2979
size 128958
oid sha256:49028b9f116c7ecf67d86363cb6728ddf97511503c4528a04c641920a878565d
size 130118

View File

@ -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)

View File

@ -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')

View File

@ -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')
)