summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2025-03-20 12:37:21 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2025-03-20 13:04:05 +0100
commitb1d246d7045e07200b21049a714027dd72060f84 (patch)
tree8549ee5ced0ff1a90eedb1d14fd450d71ac16e96 /archaeological_operations/models.py
parentf3926450e8b990a8b773aa76c5d58c63fdc5758d (diff)
downloadIshtar-b1d246d7045e07200b21049a714027dd72060f84.tar.bz2
Ishtar-b1d246d7045e07200b21049a714027dd72060f84.zip
✨ wizards: improve performance when many are attached
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index d933944d1..fe6ed584e 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -2724,6 +2724,8 @@ def operation_town_m2m_changed(sender, **kwargs):
operation = kwargs.get("instance", None)
if not operation:
return
+ if getattr(operation, "_no_m2m_process", None):
+ return
operation._prevent_loop = False
operation.regenerate_all_ids()
geotown_attached_changed(sender, **kwargs)