X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/a4cf06ec9135a9375fbc9ed2c697bc60ad6052b5..HEAD:/src/chunks/templatetags/chunks.py diff --git a/src/chunks/templatetags/chunks.py b/src/chunks/templatetags/chunks.py index 7c431c13d..6a891f9de 100644 --- a/src/chunks/templatetags/chunks.py +++ b/src/chunks/templatetags/chunks.py @@ -1,5 +1,5 @@ -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Wolne Lektury. See NOTICE for more information. # from django import template from django.core.cache import cache @@ -25,7 +25,7 @@ def chunk(context, key, cache_time=0): n.save() content = '' - if context['request'].user.is_staff: + if 'request' in context and context['request'].user.is_staff: content = f'' + content return mark_safe(content)