Opened 4 years ago

Closed 4 years ago

#31718 closed Uncategorized (wontfix)

changepassword command should pass update_fields to user.save()

Reported by: Marcel Tschopp Owned by: Marcel Tschopp
Component: Core (Management commands) Version: 3.0
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The changepassword command should pass update_fields=("password",) when saving the user.

Change History (4)

comment:1 by Marcel Tschopp, 4 years ago

Owner: changed from nobody to Marcel Tschopp
Status: newassigned

comment:2 by Simon Charette, 4 years ago

Not sure this is desirable as it breaks any custom User model with an updated_at = models.DateTimeField(auto_now=True) field.

If updated_fields is used this potential field won't be updated on a password change through the management command anymore.

I'm inclined to 'wontfix' this ticket since update_fields would bring little benefit with a slightly backward incompatible behaviour in this case.

in reply to:  2 comment:3 by Marcel Tschopp, 4 years ago

Now that you say it, I think you are right. I also don't see any decent solution to make this configurable or extendable.

Should I close my PR?

comment:4 by Mariusz Felisiak, 4 years ago

Resolution: wontfix
Status: assignedclosed

I agree with Simon.

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