Skip to content

Commit

Permalink
perf: 减少一次邮箱的判断
Browse files Browse the repository at this point in the history
  • Loading branch information
O-Jiangweidong authored and BaiJiangJie committed Mar 11, 2024
1 parent e45676e commit afe3777
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/users/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit afe3777

Please sign in to comment.