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.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py
index bd79814e9..bdd7a67e5 100644
--- a/ishtar_common/utils.py
+++ b/ishtar_common/utils.py
@@ -2402,20 +2402,23 @@ def manage_m2m(obj, kwargs):
obj.skip_history_when_saving = True
elif not obj.history_modifier:
obj.skip_history_when_saving = True
+ obj._post_save_geo_ok = True
obj.save()
def related_historization_changed(sender, **kwargs):
rel_obj = kwargs.get("instance", None)
- if not rel_obj or not getattr(rel_obj, "CURRENT_MODEL_ATTR", None):
+ if not rel_obj or not getattr(rel_obj, "CURRENT_MODEL_ATTR", None) or getattr(
+ rel_obj, "__delete", False):
return
obj = getattr(rel_obj, rel_obj.CURRENT_MODEL_ATTR)
+ obj._post_save_geo_ok = True
manage_m2m(obj, kwargs)
def m2m_historization_changed(sender, **kwargs):
obj = kwargs.get("instance", None)
- if not obj:
+ if not obj or getattr(obj, "__delete", False):
return
manage_m2m(obj, kwargs)