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

Running before_delete on a SaveOperation does nothing #973

Open
jwoertink opened this issue Sep 13, 2023 · 0 comments
Open

Running before_delete on a SaveOperation does nothing #973

jwoertink opened this issue Sep 13, 2023 · 0 comments
Labels
improve error experience Make errors nicer to deal with

Comments

@jwoertink
Copy link
Member

Related: #898

If you accidentally type before_delete instead of before_save, your code will compile and run just fine, but it won't run that callback which could lead to weird issues at runtime.

I'd imagine it would be better to raise a compile-time error telling you that you're using the wrong callbacks.

@jwoertink jwoertink added the improve error experience Make errors nicer to deal with label Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improve error experience Make errors nicer to deal with
Projects
None yet
Development

No branches or pull requests

1 participant