diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-06-22 20:15:30 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-06-22 20:15:30 +0200 |
| commit | 69cdabcdd3fa2c3f287147869e29f8ff134cd377 (patch) | |
| tree | 3864945d874c5469cc05f1d7947125d37efd8839 /ishtar_common/utils.py | |
| parent | 447e92a636cf4f2bb29bcc7af2892d6914e3c24c (diff) | |
| download | Ishtar-69cdabcdd3fa2c3f287147869e29f8ff134cd377.tar.bz2 Ishtar-69cdabcdd3fa2c3f287147869e29f8ff134cd377.zip | |
WIP - correction suppression importdevelop-5.0
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) |
