From 0053d469f91bfc4710c5aba90212492b966ec243 Mon Sep 17 00:00:00 2001 From: Bai Date: Tue, 14 Mar 2023 16:07:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=A8=A1=E7=89=88=E4=B8=AD=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=20password=5Fstrategy=20=E5=AD=97=E6=AE=B5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/locale/zh/LC_MESSAGES/django.po | 2 +- apps/users/serializers/user.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po index 48a0ae324..7e35e43f0 100644 --- a/apps/locale/zh/LC_MESSAGES/django.po +++ b/apps/locale/zh/LC_MESSAGES/django.po @@ -6486,7 +6486,7 @@ msgstr "是否绑定了虚拟 MFA" #: users/serializers/user.py:97 msgid "Can public key authentication" -msgstr "公钥认证" +msgstr "可以使用公钥认证" #: users/serializers/user.py:165 msgid "Avatar url" diff --git a/apps/users/serializers/user.py b/apps/users/serializers/user.py index eb2a2b800..962fbcd24 100644 --- a/apps/users/serializers/user.py +++ b/apps/users/serializers/user.py @@ -81,8 +81,8 @@ class UserSerializer(RolesSerializerMixin, CommonBulkSerializerMixin, serializer password_strategy = LabeledChoiceField( choices=PasswordStrategy.choices, default=PasswordStrategy.email, + allow_null=True, required=False, - write_only=True, label=_("Password strategy"), ) mfa_enabled = serializers.BooleanField(read_only=True, label=_("MFA enabled"))