misc: protect placeholder against page missing from context (#19511)
This commit is contained in:
parent
69f2d0511f
commit
28e0bd1746
|
@ -54,7 +54,7 @@ def placeholder(context, placeholder_name, **options):
|
|||
# ajax call
|
||||
page_cells = context.get('page_cells')
|
||||
elif not context.get('render_skeleton'):
|
||||
page_cells = context['page'].get_cells()
|
||||
page_cells = context['page'].get_cells() if 'page' in context else []
|
||||
context['cells'] = [x for x in page_cells if
|
||||
x.placeholder == placeholder_name and
|
||||
(context.get('render_skeleton') or x.is_relevant(context))]
|
||||
|
|
Loading…
Reference in New Issue