This error caused by we’re using database from copy / clone database. The sequences will be mixed-up.
To solved this, just follow this way :
1 2 | python manage.py sqlsequencereset <app-name> > app.sql psql -U username -d database -a -f < app.sql |
Then your problem shall gone!