From 8fbea2f70265e2d412bb1b8179c865f143ba04fb Mon Sep 17 00:00:00 2001 From: Bai Date: Tue, 8 Jun 2021 11:29:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E8=B4=A6=E5=8F=B7name=E4=B8=BA=E9=9D=9E=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/serializers/asset_user.py | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/assets/serializers/asset_user.py b/apps/assets/serializers/asset_user.py index 6552281c6..cd098537a 100644 --- a/apps/assets/serializers/asset_user.py +++ b/apps/assets/serializers/asset_user.py @@ -64,6 +64,7 @@ class AssetUserReadSerializer(AssetUserWriteSerializer): fields_fk = ['asset', 'hostname', 'ip'] fields = fields_small + fields_fk extra_kwargs = { + 'name': {'required': False}, 'username': {'required': True}, 'password': {'write_only': True}, 'private_key': {'write_only': True},