Skip to content

Commit 0f4e780

Browse files
committed
Merge pull request django-commons#174 from maraujop/master
Caught AttributeError while rendering: 'Template' object has no attribute 'origin'
2 parents 64edae3 + d505f49 commit 0f4e780

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

debug_toolbar/panels/template.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ def content(self):
7878
# Skip templates that we are generating through the debug toolbar.
7979
if template.name and template.name.startswith('debug_toolbar/'):
8080
continue
81+
if not hasattr(template, 'origin'):
82+
continue
8183
if template.origin and template.origin.name:
8284
template.origin_name = template.origin.name
8385
else:

0 commit comments

Comments
 (0)