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

fix(history): use signal instead of method for setting timestamp #815

Merged
merged 1 commit into from
May 7, 2024

Conversation

b1rger
Copy link
Contributor

@b1rger b1rger commented May 7, 2024

When doing a CASCADING delete, the delete method of an instance is not
called, but the pre_delete signal is triggered. We want to set the
current date for the _history_date attribute, if it is None. To do
that also in cascading deletes, we use the pre_delete signal.

Closes: #814

@b1rger b1rger force-pushed the birger/fix-history-delete branch from fb89ab3 to 74630a9 Compare May 7, 2024 12:17
When doing a CASCADING delete, the `delete` method of an instance is not
called, but the `pre_delete` signal is triggered. We want to set the
current date for the `_history_date` attribute, if it is None. To do
that also in cascading deletes, we use the pre_delete signal.

Closes: #814
@b1rger b1rger marked this pull request as ready for review May 7, 2024 12:25
@b1rger b1rger merged commit ca5bf94 into main May 7, 2024
11 checks passed
@b1rger b1rger deleted the birger/fix-history-delete branch May 14, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cannot delete object related to another object
1 participant