Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

permissions:
pull-requests: write
issues: write

jobs:
comment:
Expand Down
5 changes: 3 additions & 2 deletions cms/admin/pageadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,7 @@ def delete_view(self, request, object_id, extra_context=None):
page_content = self.get_object(request, object_id=object_id)
page = page_content.page
language = page_content.language
page_contents = PageContent.admin_manager.filter(page=page, language=language)
page_url = page.urls.get(language=page_content.language)
request_language = get_site_language_from_request(request, site_id=page.node.site_id)

Expand All @@ -1273,7 +1274,7 @@ def delete_view(self, request, object_id, extra_context=None):
admin_site=self.admin_site,
)[:3]
to_delete_translations, __, perms_needed_translation = get_deleted_objects(
[page_content],
page_contents,
request=request,
admin_site=self.admin_site,
)[:3]
Expand Down Expand Up @@ -1306,7 +1307,7 @@ def delete_view(self, request, object_id, extra_context=None):
messages.success(request, message)

page_url.delete()
page_content.delete()
page_contents.delete()
for p in saved_plugins:
p.delete()

Expand Down
Loading