Skip to content

Commit

Permalink
Use get to optional value
Browse files Browse the repository at this point in the history
  • Loading branch information
wakibi committed Dec 12, 2022
1 parent 0a5ad2a commit d9bfccc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion di_website/publications/templatetags/report_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def chapter_nav_slice(chapters, chapter_number=0, max_length=6):
@register.simple_tag(takes_context=True)
def page_contains_chart(context):
charts = {'plotly_studio': False, 'advanced': False}
self = context['page']
self = context.get('page')
try:
content = self.tools if hasattr(self, 'tools') else self.content
for item in content:
Expand Down

0 comments on commit d9bfccc

Please sign in to comment.