summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-13 14:35:29 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-09-13 14:35:29 +0200
commit1097cf9fb7f853b5a33480ad27e8683634abf491 (patch)
tree556fa3f060e8211bdceec31276055c6f822d9018 /ishtar_common
parent6969da6fc4bc8b551d94ca328400e7609c50595d (diff)
downloadIshtar-1097cf9fb7f853b5a33480ad27e8683634abf491.tar.bz2
Ishtar-1097cf9fb7f853b5a33480ad27e8683634abf491.zip
Fix cascade update of author when no BG task is set
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/models.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 4f82a1663..d5450916b 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -2124,8 +2124,10 @@ class BaseHistorizedItem(StatisticItem, TemplateItem, FullSearch, Imported,
def cascade_update(self):
for down_model in self.DOWN_MODEL_UPDATE:
if not settings.USE_BACKGROUND_TASK:
- getattr(self, down_model).update(need_update=True)
- continue
+ rel = getattr(self, down_model)
+ if hasattr(rel.model, "need_update"):
+ rel.update(need_update=True)
+ continue
for item in getattr(self, down_model).all():
cached_label_changed(item.__class__, instance=item)
if hasattr(item, "point_2d"):