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

[1521] dashboard: move delete logic to form_valid #1524

Merged
merged 1 commit into from
Feb 8, 2024
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
4 changes: 2 additions & 2 deletions adhocracy4/dashboard/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ def form_valid(self, form):


class DashboardComponentDeleteSignalMixin(edit.DeletionMixin):
def delete(self, request, *args, **kwargs):
def form_valid(self, request, *args, **kwargs):
# Project and module have to be stored before delete is called as
# they may rely on the still existing db object.
project = self.project
module = self.module

response = super().delete(request, *args, **kwargs)
response = super().form_valid(request, *args, **kwargs)

component = self.component
if component.identifier in components.projects:
Expand Down
3 changes: 3 additions & 0 deletions changelog/1521.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Fixed

- delete logic moved to form_valid method after django upgrade in dashboard component mixin
Loading