forked from extern/django-helpdesk
Add a check that the email subject template includes the ticket ID to prevent problems, to address issue raised in #577
This commit is contained in:
parent
5502333a4c
commit
e19666b729
@ -114,6 +114,10 @@ HELPDESK_STAFF_ONLY_TICKET_CC = getattr(settings, 'HELPDESK_STAFF_ONLY_TICKET_CC
|
|||||||
HELPDESK_EMAIL_SUBJECT_TEMPLATE = getattr(
|
HELPDESK_EMAIL_SUBJECT_TEMPLATE = getattr(
|
||||||
settings, 'HELPDESK_EMAIL_SUBJECT_TEMPLATE',
|
settings, 'HELPDESK_EMAIL_SUBJECT_TEMPLATE',
|
||||||
"{{ ticket.ticket }} {{ ticket.title|safe }} %(subject)s")
|
"{{ ticket.ticket }} {{ ticket.title|safe }} %(subject)s")
|
||||||
|
# since django-helpdesk may not work correctly without the ticket ID
|
||||||
|
# in the subject, let's do a check for it quick:
|
||||||
|
if HELPDESK_EMAIL_SUBJECT_TEMPLATE.find("ticket.ticket") < 0:
|
||||||
|
raise ImproperlyConfigured
|
||||||
|
|
||||||
# default fallback locale when queue locale not found
|
# default fallback locale when queue locale not found
|
||||||
HELPDESK_EMAIL_FALLBACK_LOCALE = getattr(settings, 'HELPDESK_EMAIL_FALLBACK_LOCALE', 'en')
|
HELPDESK_EMAIL_FALLBACK_LOCALE = getattr(settings, 'HELPDESK_EMAIL_FALLBACK_LOCALE', 'en')
|
||||||
|
Loading…
Reference in New Issue
Block a user