perf: 减少一次邮箱的判断

pull/12796/head
jiangweidong 2024-03-07 16:48:49 +08:00 committed by Bryan
parent e45676edc4
commit afe3777895
1 changed files with 3 additions and 3 deletions

View File

@ -244,9 +244,9 @@ def construct_user_email(username, email, email_suffix=''):
if not email:
email = validate_email(username)
if not email:
email_suffix = email_suffix or settings.EMAIL_SUFFIX
email = f'{username}@{email_suffix}'
if not email:
email_suffix = email_suffix or settings.EMAIL_SUFFIX
email = f'{username}@{email_suffix}'
return email