custom panel fix (#5049)

- Handle case where get_custom_panels returns None
This commit is contained in:
Oliver 2023-06-15 18:59:50 +10:00 committed by GitHub
parent 62faaf01c5
commit 51cece9e07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -467,7 +467,9 @@ class PanelMixin:
# Construct an updated context object for template rendering
ctx = self.get_panel_context(view, request, context)
for panel in self.get_custom_panels(view, request):
custom_panels = self.get_custom_panels(view, request) or []
for panel in custom_panels:
content_template = panel.get('content_template', None)
javascript_template = panel.get('javascript_template', None)