Found a way to avoid strange error for club page

This commit is contained in:
Antoine Bartuccio 2017-10-06 17:44:41 +02:00
parent cec3ec8164
commit 4369d9f593
Signed by: klmp200
GPG Key ID: E7245548C53F904B

View File

@ -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