From e45676edc4597c1115e22e852c8295369d816745 Mon Sep 17 00:00:00 2001 From: jiangweidong Date: Thu, 7 Mar 2024 16:43:55 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E9=82=AE=E7=AE=B1=E5=90=8E=E7=BC=80=E4=BB=A3=E7=A0=81=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/users/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/users/utils.py b/apps/users/utils.py index badecfdfc..59d9542a6 100644 --- a/apps/users/utils.py +++ b/apps/users/utils.py @@ -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