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
What operating system and processor architecture are you using?
using docker image python:3.10-slim-bullseye
What did you do?
db schema is the following:
user model has several related objects (in their str methods reference the user self.user)
e.g.
class User():
# pass
class Item():
name = ...
user = models.OneToOneField('User', related_name="item", on_delete=models.CASCADE,null=True,blank=True)
def __str__():
return f'{self.name} for {self.user}'
when I try to delete the user model from either the admin panel or the API endpoint
What did you expect to see?
the Item object DELETE Operation is logged and the object is deleted
User delete DELETE Operation is not logged although the object itself is deleted
What did you see instead?
it throws Matching Query Does not exist Exception
the Item object DELETE Operation is logged and the object is deleted
User delete DELETE Operation is not logged although the object itself is deleted
Debugging
After debugging I found that the issue results from the pre/post delete signals for the Item object when trying to write CRUD logs for the delete operations (tried to remove easy audit and remove the str method and it worked)
The text was updated successfully, but these errors were encountered:
Steps
What operating system and processor architecture are you using?
using docker image python:3.10-slim-bullseye
What did you do?
db schema is the following:
user model has several related objects (in their str methods reference the user
self.user
)e.g.
Matching Query Does not exist
ExceptionDebugging
After debugging I found that the issue results from the pre/post delete signals for the Item object when trying to write CRUD logs for the delete operations (tried to remove easy audit and remove the str method and it worked)
The text was updated successfully, but these errors were encountered: