From e2f1754a8e8c624641fe427e8c2f611f1fc5264c Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 8 Jul 2019 18:30:18 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=A0=A1=E9=AA=8C=E7=94=A8=E6=88=B7=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/serializers/system_user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/assets/serializers/system_user.py b/apps/assets/serializers/system_user.py index 6f1c5e416..d853984e2 100644 --- a/apps/assets/serializers/system_user.py +++ b/apps/assets/serializers/system_user.py @@ -60,8 +60,8 @@ class SystemUserSerializer(AuthSerializerMixin, BulkOrgResourceModelSerializer): def validate_username(self, username): if username: return username - login_mode = self.validated_data.get("login_mode") - protocol = self.validated_data.get("protocol") + login_mode = self.initial_data.get("login_mode") + protocol = self.initial_data.get("protocol") if login_mode == SystemUser.LOGIN_AUTO and \ protocol != SystemUser.PROTOCOL_VNC: msg = _('* Automatic login mode must fill in the username.')