mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-08 02:39:22 +00:00
perf: 减少一次邮箱的判断
This commit is contained in:
@@ -244,9 +244,9 @@ def construct_user_email(username, email, email_suffix=''):
|
|||||||
if not email:
|
if not email:
|
||||||
email = validate_email(username)
|
email = validate_email(username)
|
||||||
|
|
||||||
if not email:
|
if not email:
|
||||||
email_suffix = email_suffix or settings.EMAIL_SUFFIX
|
email_suffix = email_suffix or settings.EMAIL_SUFFIX
|
||||||
email = f'{username}@{email_suffix}'
|
email = f'{username}@{email_suffix}'
|
||||||
return email
|
return email
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user