8000 fix: Remove circular import in `cms.forms.validators` by fsbraun · Pull Request #8225 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

fix: Remove circular import in cms.forms.validators #8225

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
May 14, 2025
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
fix: Do not assume page url cache is filled
  • Loading branch information
fsbraun committed May 13, 2025
commit 58a0bb0956062c9ff62e4e2f8592cddaacbd5424
2 changes: 1 addition & 1 deletion cms/models/pagemodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ def get_url_obj(self, language, fallback=True):
if fallback:
languages.extend(self.get_fallbacks(language))

if language not in self.urls_cache:
if self.urls_cache is None or language not in self.urls_cache:
# `get_page_from_request` will fill the cache only for the current language
# Here, we fully fill it and try again
self.urls_cache = {url.language: url for url in self.urls.all() if url.language in languages}
Expand Down
Loading
0