Skip to content
Snippets Groups Projects
Commit 45be5cbe authored by Valentin Groues's avatar Valentin Groues :eyes:
Browse files

fix an issue with non ascii characters

parent fc7b9bd4
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -148,7 +148,7 @@ class MailTemplate(models.Model):
replacements.update({
"##DATE_FULL##": current_datetime.strftime(DATE_FORMAT_FULL),
"##DATE_SHORT##": current_datetime.strftime(DATE_FORMAT_SHORT),
"##WORKER##": str(worker)
"##WORKER##": unicode(worker)
})
def _add_appointment_replacements(self, replacements, appointment):
......@@ -173,7 +173,7 @@ class MailTemplate(models.Model):
"##A_STATUS##": appointment.get_status_display(),
"##A_LOCATION##": appointment.location.name,
"##A_LOCATION_OR_FLYINGTEAM##": appointment.flying_team or appointment.location.name,
"##A_WORKER##": str(appointment.worker_assigned),
"##A_WORKER##": unicode(appointment.worker_assigned),
'##A_WORKER_PHONE##': worker_phone_number,
'##A_WORKER_EMAIL##': worker_email_address,
"##A_ROOM##": str(appointment.room),
......@@ -197,7 +197,7 @@ class MailTemplate(models.Model):
else:
date_born = None
replacements.update({
"##S_FULL_NAME##": str(subject),
"##S_FULL_NAME##": unicode(subject),
"##S_FIRST_NAME##": subject.first_name,
"##S_LAST_NAME##": subject.last_name,
"##S_ADDRESS##": subject.address,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment