summaryrefslogtreecommitdiff
path: root/ishtar_common/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/utils.py')
-rw-r--r--ishtar_common/utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py
index 30bf4b7db..da7bf02f0 100644
--- a/ishtar_common/utils.py
+++ b/ishtar_common/utils.py
@@ -2421,6 +2421,9 @@ def related_historization_changed(sender, **kwargs):
rel_obj, "__delete", False):
return
obj = getattr(rel_obj, rel_obj.CURRENT_MODEL_ATTR)
+ # object is been deleted
+ if obj.__class__.objects.filter(pk=obj.pk, timestamp_label=-1).count():
+ return
obj._post_save_geo_ok = True
manage_m2m(obj, kwargs)
@@ -2429,6 +2432,9 @@ def m2m_historization_changed(sender, **kwargs):
obj = kwargs.get("instance", None)
if not obj or getattr(obj, "__delete", False):
return
+ # object is been deleted
+ if obj.__class__.objects.filter(pk=obj.pk, timestamp_label=-1).count():
+ return
manage_m2m(obj, kwargs)