summaryrefslogtreecommitdiff
path: root/ishtar_common/utils.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-10-01 17:23:23 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-11-16 17:04:41 +0100
commit4a16a0436dd7af9a224da6cd04fc1e49b849d193 (patch)
treeaee1e56bb522ec62ff624c28ff475534e590f211 /ishtar_common/utils.py
parenta18d2452c8f15792724dd56b53d991247463ceec (diff)
downloadIshtar-4a16a0436dd7af9a224da6cd04fc1e49b849d193.tar.bz2
Ishtar-4a16a0436dd7af9a224da6cd04fc1e49b849d193.zip
Performance on imports: group all post treatment to the end
Diffstat (limited to 'ishtar_common/utils.py')
-rw-r--r--ishtar_common/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py
index e4aade575..e48535991 100644
--- a/ishtar_common/utils.py
+++ b/ishtar_common/utils.py
@@ -474,6 +474,9 @@ EXTRA_KWARGS_TRIGGER = [
def cached_label_and_geo_changed(sender, **kwargs):
+ instance = kwargs["instance"]
+ if getattr(instance, "_no_post_save", False):
+ return
cached_label_changed(sender=sender, **kwargs)
post_save_geo(sender=sender, **kwargs)