You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mschoettle
changed the title
deleting a model: pre_save exception on CRUDEvent creation: object_id cannot be null
deleting a model: post_delete exception on CRUDEvent creation: object_id cannot be null
Sep 14, 2024
I'll try to reproduce this in a test case with TEST=False.
There are some tricks we could leverage in the tests but yes this makes to me, the django test runner runs the tests in a transaction that never commits.
We have a management command that deletes data before inserting new data. When deleting the old data, the following exception is logged:
I assume that at this point (post delete)
instance.pk
returnsNone
. Maybe the solution is to doinstance.pk or ""
or (-1)?The text was updated successfully, but these errors were encountered: