From 0f39694b279007da6d924515c3376962d80f378e 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 3d3131570..7173a2c46 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -475,6 +475,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