diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-01-25 19:25:36 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-01-25 19:25:36 +0100 |
| commit | 46084c457b6f25299488b4b13b164b67ee087c62 (patch) | |
| tree | fe80f0b957d2c358a01fc2cfdbba571ac4c591c5 | |
| parent | 9a21c87c967356e59323eb4236a5bdb7acb42ffe (diff) | |
| parent | 3a92c30b359a76ac5250039af95378497f844fae (diff) | |
| download | Ishtar-46084c457b6f25299488b4b13b164b67ee087c62.tar.bz2 Ishtar-46084c457b6f25299488b4b13b164b67ee087c62.zip | |
Merge branch 'master' into v0.9
| -rw-r--r-- | ishtar_common/models.py | 14 |
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 |
