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-10-25 12:06:03 +0200
commitdcbed2dc59559c07617b7f8d5df4693cbf51e0d7 (patch)
tree78733bafe88cf1a9c4898bc8b90e2bfa4a8e344f /ishtar_common/utils.py
parenta41ec13e091ba7d7087379089d879f93a00ab87e (diff)
downloadIshtar-dcbed2dc59559c07617b7f8d5df4693cbf51e0d7.tar.bz2
Ishtar-dcbed2dc59559c07617b7f8d5df4693cbf51e0d7.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)