-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix: Replaced languages
field from Page
which used to become inconsistent
#8080
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
Conversation
@sourcery-ai review |
Reviewer's Guide by SourceryThis PR removes the No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @fsbraun - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟡 Complexity: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
cms/migrations/0039_remove_page_languages_alter_pageurl_unique_together.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Let's get this merged.
Description
This PR removes the ambiguous
languages
field from thePage
model:Originally, it contained a chained string of available
Title
objects (which is of course redundant) and was maintained to save database hits. With django CMS 4 its use does not save database hits any more. The same information is available through the newPageUrl
model, which needs to be unique by page and language.Fixes #8019
Fixes #7838
Related resources
Checklist
develop-4
Summary by Sourcery
Remove the
languages
field from thePage
model to address inconsistencies and redundancy issues. Replace it with a more reliable mechanism using thePageUrl
model, which ensures unique page-language combinations. Deprecate related methods and update the codebase to reflect these changes, including adjustments to tests and migrations.Bug Fixes:
languages
field of thePage
model by removing it.Enhancements:
languages
attribute and related methods with a more reliable mechanism usingPageUrl
.