django-guardian
django-guardian copied to clipboard
content_object resolves to None (BaseObjectPermission)
Hi guys,
we are seeing very weird behavior on our system that we can't explain.
If check the attached log you see that self.content_object is resolved as None. However the toString of the statement before clearly shows that it is None but probably set as part of the permission.
The bug is only occurring on our kubernetes cluster with multiple nodes. We have honestly no idea what could cause it. After debugging for several hours I open the ticket now in the hope that someone else ran into it. I will keep you updated as soon as find out sth.
Environment:
- Python 3.9.5
- gunicorn 20.1.0 with uvicorn 0.13.4 (asgi3)
- Postgres 13.3
- Django 3.2
I have the same problem. Using pdb to debug, I found self.content_object was None at begining, after a moment, it's not None

Can it be the case that the referred objects was deleted?
https://github.com/django/django/commit/1a82fc245eb8ac4b131ec02a6ac3e112deb8d5a6