From 8ced6f1168e2cc1125c50d38c24c1b1b75b81a6d Mon Sep 17 00:00:00 2001 From: Bai Date: Fri, 11 Dec 2020 15:40:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=A8=E6=88=B7ProfileAPI=E8=AE=BE?= =?UTF-8?q?=E7=BD=AEis=5Ffirst=5Flogin=E4=B8=8D=E6=98=AF=E5=8F=AF=E8=AF=BB?= =?UTF-8?q?=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/users/serializers/user.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/users/serializers/user.py b/apps/users/serializers/user.py index 1e50c1107..b44ac050f 100644 --- a/apps/users/serializers/user.py +++ b/apps/users/serializers/user.py @@ -237,6 +237,9 @@ class UserProfileSerializer(UserSerializer): 'public_key_comment', 'public_key_hash_md5', 'admin_or_audit_orgs', 'current_org_roles', 'guide_url', 'user_all_orgs' ] + read_only_fields = [ + 'date_joined', 'last_login', 'created_by', 'source' + ] extra_kwargs = dict(UserSerializer.Meta.extra_kwargs) extra_kwargs.update({ 'name': {'read_only': True, 'max_length': 128},