1👍
✅
As @BillKarwin and @ysth suggested, it does sound like I am sending websocket message before database update is committed. I think I can use transaction.on_commit
to make sure it does not happen.
Also, I have added never_cached
to my views. This should stop browsers caching my results.
https://docs.djangoproject.com/en/4.2/topics/db/transactions/#performing-actions-after-commit
Source:stackexchange.com