Projet

Général

Profil

0001-misc-protect-placeholder-against-page-missing-from-c.patch

Frédéric Péters, 18 octobre 2017 10:17

Télécharger (1,05 ko)

Voir les différences:

Subject: [PATCH] misc: protect placeholder against page missing from context
 (#19511)

 combo/public/templatetags/combo.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
combo/public/templatetags/combo.py
56 56
        # ajax call
57 57
        page_cells = context.get('page_cells')
58 58
    elif not context.get('render_skeleton'):
59
        page_cells = context['page'].get_cells()
59
        page_cells = context['page'].get_cells() if 'page' in context else []
60 60
    context['cells'] = [x for x in page_cells if
61 61
            x.placeholder == placeholder_name and
62 62
            (context.get('render_skeleton') or x.is_relevant(context))]
63
-