Skip to content

Commit 2582e0d

Browse files
committed
Fixed issue with code finder when there is no current request
1 parent a299039 commit 2582e0d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

iommi/code_finder.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ def setup_code_finder():
2323
for node_class in [IncludeNode, ForNode, IfNode, TranslateNode, BlockTranslateNode]:
2424
def debug_url_render(self, context, orig_render=node_class.render):
2525
orig_result = orig_render(self, context)
26-
if '_iommi_code_finder' not in get_current_request().GET:
26+
request = get_current_request()
27+
if request and '_iommi_code_finder' not in request.GET:
2728
return orig_result
2829

2930
# Get the file path and line number from the node's origin and token

0 commit comments

Comments
 (0)