perf: 邮箱测试时,不填写'主题前缀'会报错

pull/9881/head
jiangweidong 2023-03-08 13:49:38 +08:00
parent bb30fcd7fd
commit 72ca55c293
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ class MailTestingAPI(APIView):
# if k.startswith('EMAIL'):
# setattr(settings, k, v)
try:
subject = settings.EMAIL_SUBJECT_PREFIX + "Test"
subject = settings.EMAIL_SUBJECT_PREFIX or '' + "Test"
message = "Test smtp setting"
email_from = email_from or email_host_user
email_recipient = email_recipient or email_from