From 9a35d4413458943022a7383f7aae818986a814b5 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 26 Aug 2016 12:04:46 +0200 Subject: Cache: fix caching key for models with the same name on different app (such as RelationType) --- ishtar_common/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ishtar_common/utils.py') diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py index 25ae6ddf5..28b1affa5 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -24,7 +24,8 @@ from django.template.defaultfilters import slugify def get_cache(cls, extra_args=[]): - cache_key = u"{}-{}".format(settings.PROJECT_SLUG, cls.__name__) + cache_key = u"{}-{}-{}".format( + settings.PROJECT_SLUG, cls._meta.app_label, cls.__name__) for arg in extra_args: if not arg: cache_key += '-0' -- cgit v1.2.3