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 , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 7 years ago
Has patch: | set |
---|---|
Needs tests: | set |
comment:3 by , 7 years ago
Component: | Core (Management commands) → contrib.auth |
---|---|
Resolution: | → duplicate |
Status: | assigned → closed |
Summary: | Fix uniqueness problem in createsupperuser → createsuperuser doesn't validate username provided via --username |
Duplicate of #28016.
Note:
See TracTickets
for help on using tickets.
PRhttps://github.com/django/django/pull/9554