Regression in form field _has_changed for fields with show_hidden_initial=True
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)
| Cc: |
Claude Paroz added
|
| Severity: |
Normal → Release blocker
|
| Triage Stage: |
Unreviewed → Accepted
|
| Triage Stage: |
Accepted → Ready for checkin
|
| Resolution: |
→ fixed
|
| Status: |
new → closed
|
Tim, can you check if this commit fixes your issue:
https://github.com/claudep/django/commit/25a38cf3f66daed8ab17aa33b2955ee4ccde0407