diff --git a/smash/web/models/mail_template.py b/smash/web/models/mail_template.py index 8c3a7fa699c17b2965123ede3c2b5a6243164011..9803905cdbd38f69cf579cb622b606563b979068 100644 --- a/smash/web/models/mail_template.py +++ b/smash/web/models/mail_template.py @@ -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()]) })