fix(assets): 修复网关信息没有密码的bug

pull/6169/head
ibuler 2021-05-21 15:13:43 +08:00 committed by Jiangjie.Bai
parent 9ccde03656
commit d765e61991
1 changed files with 7 additions and 7 deletions

View File

@ -78,12 +78,12 @@ class GatewaySerializer(AuthSerializerMixin, BulkOrgResourceModelSerializer):
class GatewayWithAuthSerializer(GatewaySerializer): class GatewayWithAuthSerializer(GatewaySerializer):
def get_field_names(self, declared_fields, info): class Meta(GatewaySerializer.Meta):
fields = super().get_field_names(declared_fields, info) extra_kwargs = {
fields.extend( 'password': {'write_only': False, 'validators': [NoSpecialChars()]},
['password', 'private_key'] 'private_key': {"write_only": False},
) 'public_key': {"write_only": False},
return fields }
class DomainWithGatewaySerializer(BulkOrgResourceModelSerializer): class DomainWithGatewaySerializer(BulkOrgResourceModelSerializer):