diff --git a/tenant_schemas/template_loaders.py b/tenant_schemas/template_loaders.py index 6224a268..6e966c5c 100644 --- a/tenant_schemas/template_loaders.py +++ b/tenant_schemas/template_loaders.py @@ -38,7 +38,9 @@ def __init__(self, engine, loaders): @staticmethod def cache_key(template_name, template_dirs): - if connection.tenant and template_dirs: + if connection.tenant: + if not template_dirs: + template_dirs = settings.MULTITENANT_TEMPLATE_DIRS return '-'.join([str(connection.tenant.pk), template_name, hashlib.sha1(force_bytes('|'.join(template_dirs))).hexdigest()]) if template_dirs: