fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix
[wolnelektury.git]
/
src
/
chunks
/
templatetags
/
chunks.py
diff --git
a/src/chunks/templatetags/chunks.py
b/src/chunks/templatetags/chunks.py
index
7c431c1
..
b8e9f4f
100644
(file)
--- 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'<span data-edit="chunks/chunk/{key}"></span>' + content
return mark_safe(content)