[Answered ]-Django – update query doesn't work in pre_delete signal

1👍

I moved the logic to the delete() function of the Wallet model instead of using the pre_delete() signal, and it’s fixed now.

0👍

Maybe it cant find default wallet so it tries go get the first one which is the wallet you want to delete (because it’s before delete so it still exist).

Try to exclude pk=instance.pk in your default_wallet query.

👤mon io

Leave a comment