Browse Source

fix: 修复账号改密密码规则提交不生效的问题

pull/11920/head
Bai 1 year ago committed by 老广
parent
commit
939b517e34
  1. 5
      apps/accounts/serializers/automations/change_secret.py

5
apps/accounts/serializers/automations/change_secret.py

@ -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…
Cancel
Save