Check request.current_page is present

This commit is contained in:
PCoder 2017-11-24 22:45:28 +01:00
parent 4a27890db5
commit cbac0dc156

View file

@ -13,7 +13,8 @@ class GlasfaserMenu(CMSAttachMenu):
def get_nodes(self, request):
nodes = []
glasfaser_cms = 'ungleich_page/glasfaser_cms_page.html'
if request and request.current_page.get_template() == glasfaser_cms:
if (request and request.current_page and
request.current_page.get_template() == glasfaser_cms):
template_context = {
"request": request,
}