[Django]-Django 'Key(field)=() is duplicated'

7👍

The traceback is telling you that the error occurs when you try to run migration 0025.

The output of python manage.py showmigrations tells you that migrations 0025-0030 have not been applied.

[X] 0022_auto_20170109_1620
[X] 0023_auto_20170109_1621
[X] 0024_auto_20170112_1933
[ ] 0025_auto_20170425_1827
[ ] 0026_auto_20170425_1829
[ ] 0027_auto_20170425_1839
[ ] 0028_auto_20170425_1840
[ ] 0029_remove_blogcategory_title
[ ] 0030_blogcategory_title

Therefore it should be safe to delete these migrations (you might want to back them up to be on the safe side). You can then rerun makemigrations and migrate to re-create and run new migrations.

Leave a comment