From da35e931a2cbdafa69a571676aa846d215e451e3 Mon Sep 17 00:00:00 2001 From: feng626 <1304903146@qq.com> Date: Thu, 29 Sep 2022 14:19:14 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=9B=B4=E6=96=B0=E5=B9=B3=E5=8F=B0use?= =?UTF-8?q?rname=20passwd=20submit=20selector=E5=8F=AF=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/serializers/platform.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/assets/serializers/platform.py b/apps/assets/serializers/platform.py index b1e6820cd..f5fe60376 100644 --- a/apps/assets/serializers/platform.py +++ b/apps/assets/serializers/platform.py @@ -6,7 +6,6 @@ from common.drf.serializers import JMSWritableNestedModelSerializer from ..models import Platform, PlatformProtocol, PlatformAutomation from ..const import Category, AllTypes - __all__ = ['PlatformSerializer', 'PlatformOpsMethodSerializer'] @@ -27,9 +26,9 @@ class ProtocolSettingSerializer(serializers.Serializer): # HTTP auto_fill = serializers.BooleanField(default=False, label=_("Auto fill")) - username_selector = serializers.CharField(default='', label=_("Username selector")) - password_selector = serializers.CharField(default='', label=_("Password selector")) - submit_selector = serializers.CharField(default='', label=_("Submit selector")) + username_selector = serializers.CharField(default='', allow_blank=True, label=_("Username selector")) + password_selector = serializers.CharField(default='', allow_blank=True, label=_("Password selector")) + submit_selector = serializers.CharField(default='', allow_blank=True, label=_("Submit selector")) class PlatformAutomationSerializer(serializers.ModelSerializer):