[Django] #31718: changepassword command should pass update_fields to user.save()

10 views
Skip to first unread message

Django

unread,
Jun 18, 2020, 7:22:51 AM6/18/20
to django-...@googlegroups.com
#31718: changepassword command should pass update_fields to user.save()
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
marceltschoppch |
Type: | Status: new
Uncategorized |
Component: Core | Version: 3.0
(Management commands) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
The `changepassword` command should pass `update_fields=("password",)`
when saving the user.

--
Ticket URL: <https://code.djangoproject.com/ticket/31718>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 18, 2020, 7:31:03 AM6/18/20
to django-...@googlegroups.com
#31718: changepassword command should pass update_fields to user.save()
-------------------------------------+-------------------------------------
Reporter: marceltschoppch | Owner:
| marceltschoppch
Type: Uncategorized | Status: assigned
Component: Core (Management | Version: 3.0
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by marceltschoppch):

* owner: nobody => marceltschoppch
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/31718#comment:1>

Django

unread,
Jun 18, 2020, 8:58:04 AM6/18/20
to django-...@googlegroups.com
#31718: changepassword command should pass update_fields to user.save()
-------------------------------------+-------------------------------------
Reporter: Marcel Tschopp | Owner: Marcel
| Tschopp

Type: Uncategorized | Status: assigned
Component: Core (Management | Version: 3.0
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/31718#comment:2>

Django

unread,
Jun 18, 2020, 9:42:23 AM6/18/20
to django-...@googlegroups.com
#31718: changepassword command should pass update_fields to user.save()
-------------------------------------+-------------------------------------
Reporter: Marcel Tschopp | Owner: Marcel
| Tschopp
Type: Uncategorized | Status: assigned
Component: Core (Management | Version: 3.0
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Marcel Tschopp):

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?

--
Ticket URL: <https://code.djangoproject.com/ticket/31718#comment:3>

Django

unread,
Jun 18, 2020, 10:18:09 AM6/18/20
to django-...@googlegroups.com
#31718: changepassword command should pass update_fields to user.save()
-------------------------------------+-------------------------------------
Reporter: Marcel Tschopp | Owner: Marcel
| Tschopp
Type: Uncategorized | Status: closed

Component: Core (Management | Version: 3.0
commands) |
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* status: assigned => closed
* resolution: => wontfix


Comment:

I agree with Simon.

--
Ticket URL: <https://code.djangoproject.com/ticket/31718#comment:4>

Reply all
Reply to author
Forward
0 new messages