mirror of https://github.com/jumpserver/jumpserver
fix: 修复账号改密密码规则提交不生效的问题
parent
66eac762ff
commit
939b517e34
|
@ -71,7 +71,6 @@ class ChangeSecretAutomationSerializer(AuthValidateMixin, BaseAutomationSerializ
|
|||
return password_rules
|
||||
|
||||
length = password_rules.get('length')
|
||||
symbol_set = password_rules.get('symbol_set', '')
|
||||
|
||||
try:
|
||||
length = int(length)
|
||||
|
@ -84,10 +83,6 @@ class ChangeSecretAutomationSerializer(AuthValidateMixin, BaseAutomationSerializ
|
|||
msg = _('* Password length range 6-30 bits')
|
||||
raise serializers.ValidationError(msg)
|
||||
|
||||
if not isinstance(symbol_set, str):
|
||||
symbol_set = str(symbol_set)
|
||||
|
||||
password_rules = {'length': length, 'symbol_set': ''.join(symbol_set)}
|
||||
return password_rules
|
||||
|
||||
def validate(self, attrs):
|
||||
|
|
Loading…
Reference in New Issue