From 8aa707427f2275f07391c7730e35b6ed412fbffe Mon Sep 17 00:00:00 2001 From: ibuler Date: Sun, 28 Apr 2024 16:01:09 +0800 Subject: [PATCH] pref: remove user source choice --- apps/i18n/lina/en.json | 1 + apps/users/serializers/user.py | 10 ---------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/apps/i18n/lina/en.json b/apps/i18n/lina/en.json index 719e79486..985327301 100644 --- a/apps/i18n/lina/en.json +++ b/apps/i18n/lina/en.json @@ -913,6 +913,7 @@ "Resume": "Recovery", "ResumeTaskSendSuccessMsg": "Recovery Task Issued, Please Refresh Later", "Retry": "Retry", + "ConnectAssets": "Connect", "Reviewer": "Approvers", "Role": "Role", "RoleCreate": "Create a role", diff --git a/apps/users/serializers/user.py b/apps/users/serializers/user.py index fb8302223..33b40a488 100644 --- a/apps/users/serializers/user.py +++ b/apps/users/serializers/user.py @@ -181,16 +181,6 @@ class UserSerializer(RolesSerializerMixin, ResourceLabelsMixin, CommonBulkModelS 'mfa_level': {'label': _("MFA level")}, } - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - self.set_source_options() - - def set_source_options(self): - field = self.fields.get("source") - if not field: - return - field.choices = User.get_source_choices() - def validate_password(self, password): password_strategy = self.initial_data.get("password_strategy") if self.instance is None and password_strategy != PasswordStrategy.custom: