From add600f3ca3a6adbb996b1fd0a0b4c16ea03ca7a Mon Sep 17 00:00:00 2001 From: smilerz Date: Tue, 28 Nov 2023 08:55:27 -0600 Subject: [PATCH] safely get icon from request.space in tag logo_url --- cookbook/templatetags/theming_tags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/templatetags/theming_tags.py b/cookbook/templatetags/theming_tags.py index 8ec04c237d..d3febbbcd3 100644 --- a/cookbook/templatetags/theming_tags.py +++ b/cookbook/templatetags/theming_tags.py @@ -27,7 +27,7 @@ def theme_url(request): @register.simple_tag def logo_url(request): - if request.user.is_authenticated and request.space.image: + if request.user.is_authenticated and getattr(getattr(request, "space", {}), 'image', None): return request.space.image.file.url else: return static('assets/brand_logo.png')