perf: 优化获取邮箱后缀代码位置

pull/12796/head
jiangweidong 2024-03-07 16:43:55 +08:00 committed by Bryan
parent 60e4b19d07
commit e45676edc4
1 changed files with 1 additions and 2 deletions

View File

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