diff options
-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 |