From 35b80da2036e2fcd24ffad3ce5844c2a5db266b2 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 20 Mar 2019 11:16:50 +0100 Subject: Cache dynamic choices --- 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 1d44026e0..55e3a3a75 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -309,6 +309,9 @@ def cached_label_changed(sender, **kwargs): if not force_update and hasattr(instance, '_cached_label_checked') \ and instance._cached_label_checked: return + if hasattr(instance, "refresh_cache"): + instance.refresh_cache() + instance._cached_label_checked = True cached_labels = ['cached_label'] if hasattr(sender, 'CACHED_LABELS'): -- cgit v1.2.3