perf: 减少一次邮箱的判断

This commit is contained in:
jiangweidong
2024-03-07 16:48:49 +08:00
committed by Bryan
parent e45676edc4
commit afe3777895

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