fix: 修复自定义远程应用的连接问题

pull/10842/head
Eric 2023-06-27 10:48:57 +08:00 committed by Bryan
parent 17fa139bc9
commit a64aa89b3f
1 changed files with 1 additions and 4 deletions

View File

@ -1,7 +1,6 @@
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
from assets.const import Protocol
from common.serializers.fields import LabeledChoiceField
from orgs.mixins.serializers import BulkOrgResourceModelSerializer
from .terminal import TerminalSmallSerializer
@ -14,11 +13,9 @@ __all__ = [
]
class SessionSerializer(BulkOrgResourceModelSerializer):
org_id = serializers.CharField(allow_blank=True)
protocol = serializers.ChoiceField(choices=Protocol.choices, label=_("Protocol"))
protocol = serializers.CharField(max_length=128, label=_("Protocol"))
type = LabeledChoiceField(
choices=SessionType.choices, label=_("Type"), default=SessionType.normal
)