Skip to content

Commit f88f355

Browse files
committed
fix(config): Remove bad translation function around email subject.
- cherry-picking main commit 0c962ca with modifications based on dev/next config restructuring.
1 parent 1a4fc5d commit f88f355

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

site/kcworks/config/mail.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,9 @@
4545

4646
# Welcome email
4747
# -------------
48-
SECURITY_EMAIL_SUBJECT_REGISTER = _("Welcome to KCWorks!")
48+
# Plain str (not lazy_gettext): this value is read once at app config load,
49+
# outside any request/locale context, so lazy translation would not produce a
50+
# recipient-localized subject. A LazyString here also breaks Kombu when
51+
# Invenio-Accounts' delay_security_email pushes msg.__dict__ to Celery
52+
# (kombu.exceptions.EncodeError: can not serialize 'LazyString' object).
53+
SECURITY_EMAIL_SUBJECT_REGISTER = "Welcome to KCWorks!"

0 commit comments

Comments
 (0)