IntegrityError when I go to create superuser in Django
I am doing a blog project, I have made the user registration and login to be done through email, instead of using username. When I went to create the superuser to access admin, I get the following error in terminal. For the database I have connected it with PostgreSQL.
django.db.utils.IntegrityError: llave duplicada viola restricción de unicidad «accounts_customuser_username_key» DETAIL: Ya existe la llave (username)=()
Can someone help me with this problem?
I hope you can guide me to solve this problem and to understand it so that I can solve it. Also to know if it is a problem with Django and the database configuration or if it has to do with PostgreSQL.