summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-01-25 19:24:08 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-01-25 19:24:08 +0100
commit519c53d01ce7f03fe670a7e6fec017f134190d1f (patch)
tree5f7d4e3ee38342859ec8d2e2ee45adfb4b5f09a8 /ishtar_common/models.py
parentb9b66039d4c21d634052a8ae4d942bb449f3abc9 (diff)
downloadIshtar-519c53d01ce7f03fe670a7e6fec017f134190d1f.tar.bz2
Ishtar-519c53d01ce7f03fe670a7e6fec017f134190d1f.zip
Fix unicode problem on adresses
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 385cf8f68..7491f5704 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -1090,16 +1090,22 @@ class Address(BaseHistorizedItem):
if self.postal_code or self.town:
if lbl:
lbl += "\n"
- lbl += "{}{}{}".format(
+ lbl += u"{}{}{}".format(
self.postal_code or '',
" " if self.postal_code and self.town else '',
self.town or '')
if self.phone:
- lbl += "{}{}".format(unicode(_("Tel:")), self.phone)
+ if lbl:
+ lbl += u"\n"
+ lbl += u"{}{}".format(unicode(_("Tel: ")), self.phone)
if self.mobile_phone:
- lbl += "{}{}".format(unicode(_("Mobile: ")), self.mobile_phone)
+ if lbl:
+ lbl += u"\n"
+ lbl += u"{}{}".format(unicode(_("Mobile: ")), self.mobile_phone)
if self.email:
- lbl += "{}{}".format(unicode(_("Email: ")), self.email)
+ if lbl:
+ lbl += u"\n"
+ lbl += u"{}{}".format(unicode(_("Email: ")), self.email)
return lbl