From 9fe5496ce920ddce9a4a78da1ae75e0d3841ac1e Mon Sep 17 00:00:00 2001 From: jing guo Date: Tue, 27 Apr 2021 18:19:54 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=BF=87=20api=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=B5=84=E4=BA=A7=EF=BC=8C=E4=B8=8D=E5=86=99=20protocols=20?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E9=BB=98=E8=AE=A4=E5=80=BC=E5=BA=94=E8=AF=A5?= =?UTF-8?q?=E6=98=AF=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/serializers/asset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/assets/serializers/asset.py b/apps/assets/serializers/asset.py index 9d8f9f27a..80e923b00 100644 --- a/apps/assets/serializers/asset.py +++ b/apps/assets/serializers/asset.py @@ -65,7 +65,7 @@ class AssetSerializer(BulkOrgResourceModelSerializer): platform = serializers.SlugRelatedField( slug_field='name', queryset=Platform.objects.all(), label=_("Platform") ) - protocols = ProtocolsField(label=_('Protocols'), required=False) + protocols = ProtocolsField(label=_('Protocols'), required=False, default=['ssh/22']) domain_display = serializers.ReadOnlyField(source='domain.name', label=_('Domain name')) admin_user_display = serializers.ReadOnlyField(source='admin_user.name', label=_('Admin user name')) nodes_display = serializers.ListField(child=serializers.CharField(), label=_('Nodes name'), required=False)