diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-04-30 16:26:37 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-04-30 16:26:37 +0200 |
commit | 55fda6c9bd1cd304137e38e195e641f6b29116ce (patch) | |
tree | b5e0d804e5ab2f57b6ae71d4553e6c3e16d8cff2 /ishtar_common/models.py | |
parent | dcae60f13e35d2b0298d8e184e32c0c6353bb520 (diff) | |
download | Ishtar-55fda6c9bd1cd304137e38e195e641f6b29116ce.tar.bz2 Ishtar-55fda6c9bd1cd304137e38e195e641f6b29116ce.zip |
Add extra fields to Operation (fr specific) - many display improvment
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 61c7de7ff..8fcfacc9a 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -578,12 +578,10 @@ class Person(Address, OwnPerms) : ) def __unicode__(self): - lbl = u"%s %s" % (self.name, self.surname) - if self.attached_to: - lbl += settings.JOINT + unicode(self.attached_to) - elif self.email: - lbl += settings.JOINT + self.email - return lbl + values = [unicode(getattr(self, attr)) + for attr in ('surname', 'name', 'attached_to') + if getattr(self, attr)] + return u" ".join(values) def full_label(self): values = [] |