From fcee95bd607847eeac9b8a0faab720b4732234c1 Mon Sep 17 00:00:00 2001 From: Gwendolyn Date: Mon, 18 Mar 2024 23:30:00 +0100 Subject: [PATCH] *now* it is good though I think --- src/c3nav/mapdata/render/theme.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/c3nav/mapdata/render/theme.py b/src/c3nav/mapdata/render/theme.py index d159cbcc..edf18583 100644 --- a/src/c3nav/mapdata/render/theme.py +++ b/src/c3nav/mapdata/render/theme.py @@ -78,9 +78,11 @@ class ColorManager: @classmethod def for_theme(cls, theme): from c3nav.mapdata.models import MapUpdate - if cls.cache_key != MapUpdate.current_cache_key(): + current_cache_key = MapUpdate.current_cache_key() + if cls.cache_key != current_cache_key: cls.default_theme = None cls.themes = {} + cls.cache_key = current_cache_key if theme is None: if cls.default_theme is None: cls.default_theme = ThemeColorManager()