Opened 7 years ago

Closed 7 years ago

#28998 closed Bug (duplicate)

createsuperuser doesn't validate username provided via --username

Reported by: Hasan Ramezani Owned by: Hasan Ramezani
Component: contrib.auth Version: 2.0
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

when I create the superuser with --username and the user already exists, command results in:
django.db.utils.IntegrityError: UNIQUE constraint failed: auth_user.username
and there is no username uniqueness checking in this state. and same behavior when I create the superuser with --username and --noinput.

Change History (3)

comment:1 by Hasan Ramezani, 7 years ago

Owner: changed from nobody to Hasan Ramezani
Status: newassigned

comment:2 by Hasan Ramezani, 7 years ago

Has patch: set
Needs tests: set

comment:3 by Tim Graham, 7 years ago

Component: Core (Management commands)contrib.auth
Resolution: duplicate
Status: assignedclosed
Summary: Fix uniqueness problem in createsupperusercreatesuperuser doesn't validate username provided via --username

Duplicate of #28016.

Note: See TracTickets for help on using tickets.
Back to Top