From 4369d9f59300afb9ef95ca937380cee781591463 Mon Sep 17 00:00:00 2001 From: klmp200 Date: Fri, 6 Oct 2017 17:44:41 +0200 Subject: [PATCH] Found a way to avoid strange error for club page --- core/views/page.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/views/page.py b/core/views/page.py index 7fd48308..14d50187 100644 --- a/core/views/page.py +++ b/core/views/page.py @@ -214,7 +214,7 @@ class PageEditView(PageEditViewBase): def dispatch(self, request, *args, **kwargs): res = super(PageEditView, self).dispatch(request, *args, **kwargs) - if self.object.page.need_club_redirection: + if self.object and self.object.page.need_club_redirection: return redirect('club:club_edit_page', club_id=self.object.page.club.id) return res