perf: account push no password (#9457)

Co-authored-by: feng <1304903146@qq.com>
pull/9459/head
fit2bot 2023-02-07 20:18:54 +08:00 committed by GitHub
parent 38921cc5f0
commit 63a4620b19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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):