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

fix issue #165 - error with mail templates for flying team

parent 79a6b925
No related branches found
No related tags found
1 merge request!96Resolve "generating from mail templates"
Pipeline #
......@@ -173,10 +173,10 @@ class MailTemplate(models.Model):
"##A_DATE_FULL##": appointment_date_full,
"##A_DATE_SHORT##": appointment_date_short,
"##A_TIME##": appointment_date_time,
"##A_FLYING_TEAM##": appointment.flying_team,
"##A_FLYING_TEAM##": str(appointment.flying_team),
"##A_STATUS##": appointment.get_status_display(),
"##A_LOCATION##": appointment.location.name,
"##A_LOCATION_OR_FLYINGTEAM##": appointment.flying_team or appointment.location.name,
"##A_LOCATION_OR_FLYINGTEAM##": str(appointment.flying_team) or appointment.location.name,
"##A_WORKER##": unicode(appointment.worker_assigned),
'##A_WORKER_PHONE##': worker_phone_number,
'##A_WORKER_EMAIL##': worker_email_address,
......@@ -221,6 +221,6 @@ class MailTemplate(models.Model):
"##S_POST_CODE##": subject.postal_code,
"##S_SCREENING_NUMBER##": subject.screening_number,
"##S_TYPE##": subject.get_type_display(),
'##S_MAIL_LANGUAGE##': subject.default_written_communication_language,
'##S_MAIL_LANGUAGE##': str(subject.default_written_communication_language),
'##S_KNOWN_LANGUAGES##': ", ".join([l.name for l in subject.languages.all()])
})
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