summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-13 10:28:15 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-13 10:28:15 +0200
commit60e4d13e05daf7a77b988675d636b776d21f2644 (patch)
tree37d1a8d7066a2ff1b12741eb38f0d30dbc6186a6 /ishtar_common
parent5b07f6cb31a67a38083d32ec9c302c88ca1f7512 (diff)
downloadIshtar-60e4d13e05daf7a77b988675d636b776d21f2644.tar.bz2
Ishtar-60e4d13e05daf7a77b988675d636b776d21f2644.zip
Fix generate cached_label dependencies for authors, orgas, persons
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/models.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index b3956e2f1..39d949ece 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -2128,7 +2128,8 @@ class BaseHistorizedItem(StatisticItem, TemplateItem, FullSearch, Imported,
continue
for item in getattr(self, down_model).all():
cached_label_changed(item.__class__, instance=item)
- post_save_geo(item.__class__, instance=item)
+ if hasattr(item, "point_2d"):
+ post_save_geo(item.__class__, instance=item)
@classmethod
def get_verbose_name(cls):
@@ -4045,6 +4046,8 @@ class Organization(Address, Merge, OwnPerms, ValueGetter):
db_index=True)
history = HistoricalRecords()
+ DOWN_MODEL_UPDATE = ['members']
+
class Meta:
verbose_name = _("Organization")
verbose_name_plural = _("Organizations")
@@ -4219,6 +4222,7 @@ class Person(Address, Merge, OwnPerms, ValueGetter, MainItem):
cached_label = models.TextField(_("Cached name"), null=True, blank=True,
db_index=True)
history = HistoricalRecords()
+ DOWN_MODEL_UPDATE = ["author"]
class Meta:
verbose_name = _("Person")