From dcbed2dc59559c07617b7f8d5df4693cbf51e0d7 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 1 Oct 2021 17:23:23 +0200 Subject: Performance on imports: group all post treatment to the end --- ishtar_common/utils.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ishtar_common/utils.py') 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) -- cgit v1.2.3