Skip to content
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

fix: static_alias unnecessarily creates new content objects when used with versioning #202

Merged
merged 2 commits into from
Dec 5, 2023

Conversation

fsbraun
Copy link
Member

@fsbraun fsbraun commented Dec 5, 2023

This PR fixes a regression introduced in #165 which leads to the creation of a new AliasContent object for a language

  • each time the page with the template tag is viewed
  • if no published version of the alias content is available

The regression is triggered by using _default_manager once where _base_manager should have been used.

#165 introduced a test but missed the regression. This PR adds a regression test.

@fsbraun fsbraun changed the title fix: static_alias unnecessarily creates now content objects when used with versioning fix: static_alias unnecessarily creates new content objects when used with versioning Dec 5, 2023
@fsbraun fsbraun requested a review from marksweb December 5, 2023 12:25
Copy link
Member

@marksweb marksweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok this makes sense & hopefully the test count prevents regression 👍

@fsbraun fsbraun merged commit 1d23542 into django-cms:master Dec 5, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants