X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/a4cf06ec9135a9375fbc9ed2c697bc60ad6052b5..807700701f88085d514a75474b17f8e85bfd1ebd:/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)