[Fixed]-Django Assigning ID from Count: Avoiding Race Condition

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

Leave a comment