diff options
| author | Étienne Loks <etienne.loks@proxience.com> | 2013-04-30 15:27:34 +0000 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@proxience.com> | 2013-04-30 15:27:34 +0000 |
| commit | fd1647a1b8b64ad5e9e340bc54ae69258948ee77 (patch) | |
| tree | 5f5652a1fb2027bbf4dd1dc26d6e28cbc04ea8fb /ishtar_common | |
| parent | 94dfdaf3303f648de5ed228809d042f7329dc09e (diff) | |
| parent | f822d5efad930b26f8a4fe24bc802d44d1f22a15 (diff) | |
| download | Ishtar-fd1647a1b8b64ad5e9e340bc54ae69258948ee77.tar.bz2 Ishtar-fd1647a1b8b64ad5e9e340bc54ae69258948ee77.zip | |
Merge branch 'master' of lysithea.proxience.net:/home/proxience/git/ishtar
Diffstat (limited to 'ishtar_common')
| -rw-r--r-- | ishtar_common/fixtures/initial_data.json | 10 | ||||
| -rw-r--r-- | ishtar_common/models.py | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/ishtar_common/fixtures/initial_data.json b/ishtar_common/fixtures/initial_data.json index ba7a1e155..977881119 100644 --- a/ishtar_common/fixtures/initial_data.json +++ b/ishtar_common/fixtures/initial_data.json @@ -278,5 +278,15 @@ "txt_idx": "thematic_survey_report", "label": "Rapport de prospection th\u00e9matique" } + }, + { + "pk": 10, + "model": "ishtar_common.sourcetype", + "fields": { + "comment": "", + "available": true, + "txt_idx": "undefined", + "label": "Non pr\u00e9cis\u00e9" + } } ] 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 = [] |
