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

pull/10842/head
Eric 1 year ago committed by Bryan
parent 17fa139bc9
commit a64aa89b3f

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

Loading…
Cancel
Save