Skip to content

Commit

Permalink
Fix error in the region dashboard if no default language exists
Browse files Browse the repository at this point in the history
  • Loading branch information
timobrembeck committed Jun 8, 2024
1 parent 69f950a commit f3dbc77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions integreat_cms/cms/views/dashboard/dashboard_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ def get_drafted_pages(
:return: Dictionary containing the context for drafted pages for one region.
"""
if not self.request.region.default_language:
return {}

drafted_pages = PageTranslation.objects.filter(
id__in=self.latest_version_ids,
status=status.DRAFT,
Expand Down
2 changes: 2 additions & 0 deletions integreat_cms/release_notes/current/unreleased/2834.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
en: Fix error in the region dashboard if no default language exists
de: Behebe Fehler im Region-Dashboard, wenn keine Standard-Sprache existiert

0 comments on commit f3dbc77

Please sign in to comment.