From 9c8a410e5070896ff58928ceff9f73ae7ba21a2e Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Fri, 1 Jul 2022 11:03:53 +0200 Subject: [PATCH] fixed non spaced page load --- cookbook/templatetags/custom_tags.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cookbook/templatetags/custom_tags.py b/cookbook/templatetags/custom_tags.py index e76dc09a5..dac2f47e7 100644 --- a/cookbook/templatetags/custom_tags.py +++ b/cookbook/templatetags/custom_tags.py @@ -3,6 +3,7 @@ from gettext import gettext as _ import bleach import markdown as md +from django_scopes import ScopeError from markdown.extensions.tables import TableExtension from bleach_allowlist import markdown_attrs, markdown_tags from django import template @@ -172,3 +173,5 @@ def user_prefs(request): return UserPreferenceSerializer(request.user.userpreference, context={'request': request}).data except AttributeError: pass + except ScopeError: # there are pages without an active space that still need to load but don't require prefs + pass