修复网关更新获取到了明文密码

pull/6148/head
fghbng@qq.com 2021-05-19 17:33:04 +08:00 committed by Jiangjie.Bai
parent f7f9331c48
commit ac5f2c560d
1 changed files with 3 additions and 1 deletions

View File

@ -61,7 +61,9 @@ class GatewaySerializer(AuthSerializerMixin, BulkOrgResourceModelSerializer):
fields_fk = ['domain']
fields = fields_small + fields_fk
extra_kwargs = {
'password': {'validators': [NoSpecialChars()]}
'password': {'write_only': True, 'validators': [NoSpecialChars()]},
'private_key': {"write_only": True},
'public_key': {"write_only": True},
}
def __init__(self, *args, **kwargs):