diff options
-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"): |