When attempting to create a user with a unique email address, I encountered an exception because the specified username was already in use by another record. The exception indicated that a unique username is required.
_IntegrityError at /accounts/sign_up/
duplicate key value violates unique constraint "accounts_app_customuser_usernamekey"
DETAIL: Key (username)=(Ivan Parvanovski) already exists.
When attempting to create a user with a unique email address, I encountered an exception because the specified username was already in use by another record. The exception indicated that a unique username is required.
_IntegrityError at /accounts/sign_up/ duplicate key value violates unique constraint "accounts_app_customuser_usernamekey" DETAIL: Key (username)=(Ivan Parvanovski) already exists.
It should be unique email address not username