Skip to content
Snippets Groups Projects
Commit d277c966 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch 'health-partner-can-have-unicode' into 'master'

handle unicode properly

See merge request NCER-PD/scheduling-system!255
parents 1694ebd5 723a6b14
No related branches found
No related tags found
1 merge request!255handle unicode properly
Pipeline #27804 passed
...@@ -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##"] = ""
......
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