diff options
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 |
commit | 9dbf9e39344f8165482b116bfabcaa442eb66c6a (patch) | |
tree | 556fa3f060e8211bdceec31276055c6f822d9018 /ishtar_common | |
parent | 9c0ee6ee690f176dd6c944d263ec45678ebec49e (diff) | |
download | Ishtar-9dbf9e39344f8165482b116bfabcaa442eb66c6a.tar.bz2 Ishtar-9dbf9e39344f8165482b116bfabcaa442eb66c6a.zip |
Fix cascade update of author when no BG task is set
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/models.py | 6 |
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"): |