diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-06-23 10:28:33 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-06-23 10:28:33 +0200 |
| commit | bd5535ae6d66a1df704180d635c29abab8187197 (patch) | |
| tree | b6f101c8c686d8484bd72d9ef82490794a8e07aa /ishtar_common/utils.py | |
| parent | 447e92a636cf4f2bb29bcc7af2892d6914e3c24c (diff) | |
| download | Ishtar-bd5535ae6d66a1df704180d635c29abab8187197.tar.bz2 Ishtar-bd5535ae6d66a1df704180d635c29abab8187197.zip | |
🚑️ fix import deletion with item witch have associated datings
Diffstat (limited to 'ishtar_common/utils.py')
| -rw-r--r-- | ishtar_common/utils.py | 6 |
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) |
