From 69cdabcdd3fa2c3f287147869e29f8ff134cd377 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 22 Jun 2026 20:15:30 +0200 Subject: WIP - correction suppression import --- ishtar_common/utils.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ishtar_common/utils.py') 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) -- cgit v1.2.3