Just fetch alias_of when checking ancestor view permissions

pull/6822/head
Matt Westcott 2021-02-16 12:02:50 +00:00
rodzic a75d70baf9
commit 84e41cc23f
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -2694,7 +2694,7 @@ class Page(AbstractPage, index.Indexed, ClusterableModel, metaclass=PageBase):
add_page_to_check_list(self)
# Check each ancestor for view restrictions as well
for page in self.get_ancestors():
for page in self.get_ancestors().only('alias_of'):
add_page_to_check_list(page)
return PageViewRestriction.objects.filter(page_id__in=page_ids_to_check)