Browse Source

perf: account push no password (#9457)

Co-authored-by: feng <1304903146@qq.com>
pull/9459/head
fit2bot 2 years ago committed by GitHub
parent
commit
63a4620b19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      apps/accounts/utils.py

3
apps/accounts/utils.py

@ -20,7 +20,8 @@ class SecretGenerator:
return private_key
def generate_password(self):
length = int(self.password_rules.get('length', DEFAULT_PASSWORD_RULES['length']))
length = int(self.password_rules.get('length', 0))
length = length if length else DEFAULT_PASSWORD_RULES['length']
return random_string(length, special_char=True)
def get_secret(self):

Loading…
Cancel
Save