mirror of https://github.com/jumpserver/jumpserver
commit
65060a9416
|
@ -60,8 +60,8 @@ class SystemUserSerializer(AuthSerializerMixin, BulkOrgResourceModelSerializer):
|
||||||
def validate_username(self, username):
|
def validate_username(self, username):
|
||||||
if username:
|
if username:
|
||||||
return username
|
return username
|
||||||
login_mode = self.validated_data.get("login_mode")
|
login_mode = self.initial_data.get("login_mode")
|
||||||
protocol = self.validated_data.get("protocol")
|
protocol = self.initial_data.get("protocol")
|
||||||
if login_mode == SystemUser.LOGIN_AUTO and \
|
if login_mode == SystemUser.LOGIN_AUTO and \
|
||||||
protocol != SystemUser.PROTOCOL_VNC:
|
protocol != SystemUser.PROTOCOL_VNC:
|
||||||
msg = _('* Automatic login mode must fill in the username.')
|
msg = _('* Automatic login mode must fill in the username.')
|
||||||
|
|
Loading…
Reference in New Issue