8000 fix: Remove deprecated `get_storage_class` import from `cms.utils` by fsbraun · Pull Request #8102 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

fix: Remove deprecated get_storage_class import from cms.utils #8102

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 8 commits into from
Jan 8, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

8000
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add output_field to Concat
  • Loading branch information
fsbraun authored Jan 2, 2025
commit a58f3601231b255bf95b6857815a18a2b22767b7
6 changes: 3 additions & 3 deletions cms/models/pagemodel.py
new_path = models.F('slug')
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def _update_title_path_recursive(self, language, slug=None):
base = self.get_path(language, fallback=True)

if base:
new_path = Concat(models.Value(base), models.Value('/'), models.F('slug'))
new_path = Concat(models.Value(base), models.Value('/'), models.F('slug'), output_field=models.CharField())
else:
# User is moving the homepage
new_path = models.F('slug')
Expand All @@ -386,7 +386,7 @@ def _set_title_root_path(self):
# to include this page's slug as its path prefix
(translations
.filter(language=language)
.update(path=Concat(models.Value(slug), models.Value('/'), 'path')))
.update(path=Concat(models.Value(slug), models.Value('/'), 'path', output_field=models.CharField())))

# Explicitly update this page's path to match its slug
# Doing this is cheaper than a TRIM call to remove the "/" characters
Expand Down Expand Up @@ -1190,7 +1190,7 @@ def mark_descendants_as_published(self, language):
)

if base:
new_path = Concat(models.Value(base), models.Value('/'), models.F('slug'))
new_path = Concat(models.Value(base), models.Value('/'), models.F('slug'), output_field=models.CharField())
else:
# User is moving the homepage
Expand Down
Loading
0