X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/a4cf06ec9135a9375fbc9ed2c697bc60ad6052b5..db0d48d5087bd81928eceffec3dd9379ca52f558:/src/chunks/templatetags/chunks.py diff --git a/src/chunks/templatetags/chunks.py b/src/chunks/templatetags/chunks.py index 7c431c13d..b8e9f4f6d 100644 --- a/src/chunks/templatetags/chunks.py +++ b/src/chunks/templatetags/chunks.py @@ -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)