diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-08-08 13:24:30 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-08-13 18:26:03 +0200 |
commit | 15e4d32a3220f0f0f4de43f0217b893da862cc4a (patch) | |
tree | cf0c5f77f7b626d51ff492963bb805461491a355 /ishtar_common | |
parent | feb3e70384b7c3468a35300274a015592528559b (diff) | |
download | Ishtar-15e4d32a3220f0f0f4de43f0217b893da862cc4a.tar.bz2 Ishtar-15e4d32a3220f0f0f4de43f0217b893da862cc4a.zip |
Towns: better management of cached label
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 4b663aa23..10939deea 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -3556,7 +3556,7 @@ class Town(Imported, models.Model): cached_label = self.name if settings.COUNTRY == "fr": cached_label = u"%s - %s" % (self.name, self.numero_insee[:2]) - if self.year: + if self.year and self.children.count(): cached_label += " ({})".format(self.year) return cached_label |