misc: don't crash in placeholder templatetag if page_cells is undefined (#8812)

This commit is contained in:
Frédéric Péters 2015-10-28 15:42:15 +01:00
parent da6a770a4a
commit c646b93232
1 changed files with 1 additions and 1 deletions

View File

@ -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']: