1👍
✅
this is basically a duplicate
Avoiding race conditions, Django + Heroku + PostgreSQL
so generally you have to use .select_for_update()
to avoid the problem
https://docs.djangoproject.com/en/1.10/ref/models/querysets/#select-for-update
Source:stackexchange.com