Skip to content

Commit b8cdc20

Browse files
committed
Merge branch 'feat/account-deletion' into deploy/dev
2 parents 058ba1d + 0169c6d commit b8cdc20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/services/account_service.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from events.tenant_event import tenant_was_created
1818
from extensions.ext_database import db
1919
from extensions.ext_redis import redis_client
20-
from libs.helper import RateLimiter, TokenManager, generate_string
20+
from libs.helper import RateLimiter, TokenManager
2121
from libs.passport import PassportService
2222
from libs.password import compare_password, hash_password, valid_password
2323
from libs.rsa import generate_key_pair
@@ -257,7 +257,7 @@ def create_account_and_tenant(
257257

258258
@staticmethod
259259
def generate_account_deletion_verification_code(account: Account) -> tuple[str, str]:
260-
code = generate_string(6)
260+
code = "".join([str(random.randint(0, 9)) for _ in range(6)])
261261
token = TokenManager.generate_token(
262262
account=account, token_type="account_deletion", additional_data={"code": code}
263263
)

0 commit comments

Comments
 (0)