#20781 closed Bug (fixed)
Regression in form field _has_changed for fields with show_hidden_initial=True
Description ¶
Following [892bc91cb0] (affects 1.6.X), the date_joined
and last_login
fields always appear as "Changed" when editing a user in the admin. It looks like it affects fields with callable defaults. In this case, django.forms.fields.Field._has_changed
returns False
because initial_value
is a string and data_value
is a datetime
.
I discovered this working on #19019, the PR contains some TODOs which could be used as a regression test once this is fixed.
Change History (5)
comment:1 by , 12 years ago
Cc: | added |
---|---|
Severity: | Normal → Release blocker |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 12 years ago
Has patch: | set |
---|
comment:3 by , 12 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
It does, thanks for looking into it!
comment:4 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Tim, can you check if this commit fixes your issue:
https://github.com/claudep/django/commit/25a38cf3f66daed8ab17aa33b2955ee4ccde0407