Prevent locale switcher in page chooser from breaking at the root level

Fixes #8079
pull/8338/head
Matt Westcott 2022-04-06 21:30:36 +01:00
rodzic 999e745de5
commit eadcb7d7fc
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -161,7 +161,7 @@ def browse(request, parent_page_id=None):
if show_locale_labels:
pages = pages.select_related("locale")
if parent_page_id is None:
if parent_page.is_root():
# 'locale' is the current value of the "Locale" selector in the UI
if request.GET.get("locale"):
selected_locale = get_object_or_404(