Skip to content
Snippets Groups Projects
Commit 723a6b14 authored by piotr.gawron's avatar piotr.gawron
Browse files

handle unicode properly

parent 1694ebd5
No related branches found
No related tags found
1 merge request!255handle unicode properly
Pipeline #27382 passed
......@@ -327,10 +327,10 @@ class MailTemplate(models.Model):
'##S_KNOWN_LANGUAGES##': ", ".join([l.name for l in study_subject.subject.languages.all()])
}
if study_subject.health_partner is not None:
result["##S_HEALTH_PARTNER_NAME##"] = str(study_subject.health_partner.name)
result["##S_HEALTH_PARTNER_ADDRESS##"] = str(study_subject.health_partner.address)
result["##S_HEALTH_PARTNER_ZIP_CODE##"] = str(study_subject.health_partner.postal_code)
result["##S_HEALTH_PARTNER_CITY##"] = str(study_subject.health_partner.city)
result["##S_HEALTH_PARTNER_NAME##"] = unicode(study_subject.health_partner.name)
result["##S_HEALTH_PARTNER_ADDRESS##"] = unicode(study_subject.health_partner.address)
result["##S_HEALTH_PARTNER_ZIP_CODE##"] = unicode(study_subject.health_partner.postal_code)
result["##S_HEALTH_PARTNER_CITY##"] = unicode(study_subject.health_partner.city)
else:
result["##S_HEALTH_PARTNER_NAME##"] = ""
result["##S_HEALTH_PARTNER_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