misc: don't crash in placeholder templatetag if page_cells is undefined (#8812)
This commit is contained in:
parent
da6a770a4a
commit
c646b93232
|
@ -34,7 +34,7 @@ def skeleton_text(context, placeholder_name, content=''):
|
|||
|
||||
@register.inclusion_tag('combo/placeholder.html', takes_context=True)
|
||||
def placeholder(context, placeholder_name):
|
||||
context['cells'] = [x for x in context['page_cells'] if
|
||||
context['cells'] = [x for x in context.get('page_cells', []) if
|
||||
x.placeholder == placeholder_name and
|
||||
(context.get('render_skeleton') or x.is_relevant(context))]
|
||||
if context.get('render_skeleton') and not context['cells']:
|
||||
|
|
Loading…
Reference in New Issue