10000 fix: In rare situations the page tree preview button did not view the… · django-cms/django-cms@052eac5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 052eac5

Browse files
MacLakefsbraun
andauthored
fix: In rare situations the page tree preview button did not view the latest version (#8050)
* style: ruff format cms/admin/pageadmin.py * fix: Make sure that the latest version is opened from the page overview in admin Without applying .latest_content() on the queryset it could happen that an old version was opened when clicking on the eye icon of a page in the pages overview. * Fix: Undo format changes --------- Co-authored-by: Fabian Braun <fsbraun@gmx.de>
1 parent 70cba86 commit 052eac5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cms/admin/pageadmin.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ def get_tree(self, request):
13071307
Prefetch(
13081308
'pagecontent_set',
13091309
to_attr='filtered_translations',
1310-
queryset=PageContent.admin_manager.get_queryset() ,
1310+
queryset=PageContent.admin_manager.get_queryset().latest_content(),
13111311
),
13121312
)
13131313
rows = self.get_tree_rows(
@@ -1405,5 +1405,3 @@ def get_indicator_menu(cls, request, page_content):
14051405
),
14061406
]
14071407
return "", []
1408-
1409-

0 commit comments

Comments
 (0)
0