From b7ca2ac599a3ea7c42a76969ea6c320732e52b7b Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 11 Apr 2019 15:12:06 +0200 Subject: lazy evaluation of profile mapping --- ishtar_common/models.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 4d699bfd8..74151fa31 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -2620,6 +2620,13 @@ def get_current_profile(force=False): return IshtarSiteProfile.get_current_profile(force=force) +def _profile_mapping(): + return get_current_profile().mapping + + +profile_mapping = lazy(_profile_mapping) + + def cached_site_changed(sender, **kwargs): get_current_profile(force=True) from ishtar_common.menus import Menu -- cgit v1.2.3