8000 fix: In rare situations the page tree preview button did not view the latest version by MacLake · Pull Request #8050 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

fix: In rare situations the page tree preview button did not view the latest version #8050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Make sure that the latest version is opened from the page overvi…
…ew 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.
  • Loading branch information
MacLake committed Oct 30, 2024
commit dfb0483be1c8668629b02098ea7c7d0ba07f7a05
2 changes: 1 addition & 1 deletion cms/admin/pageadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ def get_tree(self, request):
Prefetch(
"pagecontent_set",
to_attr="filtered_translations",
queryset=PageContent.admin_manager.get_queryset(),
queryset=PageContent.admin_manager.get_queryset().latest_content(),
),
)
rows = self.get_tree_rows(
Expand Down
Loading
0