Skip to content

Commit

Permalink
fixes a no home bug found
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Lauber committed Oct 2, 2009
1 parent 00d8176 commit 37fcb44
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cms/appresolver.py
Expand Up @@ -4,6 +4,7 @@
from cms.utils.moderator import get_page_queryset
from cms.models import Title
from cms.models.pagemodel import Page
from cms.exceptions import NoHomeFound


def applications_page_check(request, current_page=None, path=None):
Expand Down Expand Up @@ -140,8 +141,11 @@ def urlpatterns(self):
# in frontend

is_draft = not cms_settings.CMS_MODERATOR
home = Page.objects.get_home()
home_titles = home.title_set.all()
try:
home = Page.objects.get_home()
home_titles = home.title_set.all()
except NoHomeFound:
home_titles = []
home_slugs = {}
for title in home_titles:
home_slugs[title.language] = title.slug
Expand Down

0 comments on commit 37fcb44

Please sign in to comment.