Skip to content

Commit

Permalink
Merge pull request #4896 from yakky/feature/fix_toolbar_ext
Browse files Browse the repository at this point in the history
Fix ExtensionToolbar when language is removed but titles still exists…
  • Loading branch information
yakky committed Jan 14, 2016
2 parents 95f9944 + 1a5179c commit 84575c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cms/extensions/toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from cms.utils.urlutils import admin_reverse
from cms.api import get_page_draft
from cms.toolbar_base import CMSToolbar
from cms.utils import get_cms_setting
from cms.utils import get_cms_setting, get_language_list
from cms.utils.permissions import has_page_change_permission
from django.core.urlresolvers import NoReverseMatch

Expand Down Expand Up @@ -125,7 +125,7 @@ def get_title_extension_admin(self, language=None):
if language:
titles = page.get_title_obj(language),
else:
titles = page.title_set.all()
titles = page.title_set.filter(language__in=get_language_list(page.site_id))
# Titles
for title in titles:
try:
Expand Down

0 comments on commit 84575c4

Please sign in to comment.