Opened 10 years ago
Closed 10 years ago
#24737 closed Cleanup/optimization (fixed)
Unnecesary kwarg passed in UserManager's _create_user
Reported by: | Luis Del Giudice | Owned by: | Luis Del Giudice |
---|---|---|---|
Component: | contrib.auth | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
From django/contrib/auth/models.py
user = self.model(username=username, email=email, is_staff=is_staff, is_active=True, is_superuser=is_superuser, date_joined=now, **extra_fields)
date_joined is being specified but in the model declaration ( line 406 ) date_joined is set to now by default.
406: date_joined = models.DateTimeField(_('date joined'), default=timezone.now
I've removed the date_joined kwarg and all tests were ok. I've pushed what i think is the solution here: https://github.com/delgiudices/django/blob/test_user/django/contrib/auth/models.py#L178
Change History (4)
comment:1 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 10 years ago
Component: | Database layer (models, ORM) → contrib.auth |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
Version: | 1.8 → master |
comment:3 by , 10 years ago
Has patch: | set |
---|---|
Triage Stage: | Accepted → Ready for checkin |
comment:4 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
In db0a0c4: