From 1f2a829983880ad60d763a5b3da77367e99e94e5 Mon Sep 17 00:00:00 2001 From: Oleg Lavrovsky Date: Fri, 22 Jun 2018 15:41:13 +0200 Subject: [PATCH] Language function correction --- publichealth/home/models/snippets.py | 2 +- publichealth/home/templates/tags/contact_name.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/publichealth/home/models/snippets.py b/publichealth/home/models/snippets.py index 5ad5fec..2adf98f 100644 --- a/publichealth/home/models/snippets.py +++ b/publichealth/home/models/snippets.py @@ -107,7 +107,7 @@ class Contact(models.Model): return { 'server': sa[0], 'site': sa[1] } def trans_title_styled(self): v = self.trans_title.split(' ') - if len(v) != 3: return v + if len(v) != 3: return self.trans_title return "%s %s %s" % tuple(v) def __str__(self): return self.trans_title diff --git a/publichealth/home/templates/tags/contact_name.html b/publichealth/home/templates/tags/contact_name.html index 0ed2b54..9caa5cc 100644 --- a/publichealth/home/templates/tags/contact_name.html +++ b/publichealth/home/templates/tags/contact_name.html @@ -1 +1 @@ -{% if html %}{{ contact.trans_title_styled|safe }}{% else %}{{ contact.trans_title }}{% endif %} +{% if html %}{{ contact.trans_title_styled|safe }}{% else %}{{ contact.title }}{% endif %}