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"))