From: Radek Czajka Date: Mon, 26 Sep 2022 10:47:14 +0000 (+0200) Subject: chunk edit fix X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/807700701f88085d514a75474b17f8e85bfd1ebd?ds=sidebyside;hp=d04b366656def9a659889c0c83b07ccd0833fd5d chunk edit fix --- 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)