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 | 1097cf9fb7f853b5a33480ad27e8683634abf491 (patch) | |
tree | 556fa3f060e8211bdceec31276055c6f822d9018 | |
parent | 6969da6fc4bc8b551d94ca328400e7609c50595d (diff) | |
download | Ishtar-1097cf9fb7f853b5a33480ad27e8683634abf491.tar.bz2 Ishtar-1097cf9fb7f853b5a33480ad27e8683634abf491.zip |
Fix cascade update of author when no BG task is set
-rw-r--r-- | archaeological_finds/urls.py | 2 | ||||
-rw-r--r-- | ishtar_common/models.py | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/archaeological_finds/urls.py b/archaeological_finds/urls.py index b3fb16d25..893265a4d 100644 --- a/archaeological_finds/urls.py +++ b/archaeological_finds/urls.py @@ -240,7 +240,7 @@ urlpatterns = [ check_rights(['change_find', 'change_own_find'])( views.treatmentfile_deletion_wizard), name='treatmentfile_deletion'), - url(r'^/treatmentfle_delete(?P<pk>.+)/$', + url(r'^treatmentfle_delete/(?P<pk>.+)/$', views.treatmentfile_delete, name='delete-treatmentfile'), url(r'get-administrativeacttreatmentfile/(?P<type>.+)?$', 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"): |