Skip to content
Snippets Groups Projects

handle unicode properly

Merged Piotr Gawron requested to merge health-partner-can-have-unicode into master
1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
@@ -327,10 +327,10 @@ class MailTemplate(models.Model):
@@ -327,10 +327,10 @@ class MailTemplate(models.Model):
'##S_KNOWN_LANGUAGES##': ", ".join([l.name for l in study_subject.subject.languages.all()])
'##S_KNOWN_LANGUAGES##': ", ".join([l.name for l in study_subject.subject.languages.all()])
}
}
if study_subject.health_partner is not None:
if study_subject.health_partner is not None:
result["##S_HEALTH_PARTNER_NAME##"] = str(study_subject.health_partner.name)
result["##S_HEALTH_PARTNER_NAME##"] = unicode(study_subject.health_partner.name)
result["##S_HEALTH_PARTNER_ADDRESS##"] = str(study_subject.health_partner.address)
result["##S_HEALTH_PARTNER_ADDRESS##"] = unicode(study_subject.health_partner.address)
result["##S_HEALTH_PARTNER_ZIP_CODE##"] = str(study_subject.health_partner.postal_code)
result["##S_HEALTH_PARTNER_ZIP_CODE##"] = unicode(study_subject.health_partner.postal_code)
result["##S_HEALTH_PARTNER_CITY##"] = str(study_subject.health_partner.city)
result["##S_HEALTH_PARTNER_CITY##"] = unicode(study_subject.health_partner.city)
else:
else:
result["##S_HEALTH_PARTNER_NAME##"] = ""
result["##S_HEALTH_PARTNER_NAME##"] = ""
result["##S_HEALTH_PARTNER_ADDRESS##"] = ""
result["##S_HEALTH_PARTNER_ADDRESS##"] = ""
Loading