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

pull/9882/head
jiangweidong 2023-03-08 13:51:40 +08:00
parent 8c4e496391
commit 50d3125fec
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