#36847: FileField(upload_to=...) callback no longer sees `auto_add_now` field
-------------------------------------+-------------------------------------
Reporter: Ran Benita | Owner: Nashrh
| Ashraf Khan
Type: Bug | Status: assigned
Component: Documentation | Version: 6.0
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 Nashrh Ashraf Khan):
* owner: (none) => Nashrh Ashraf Khan
* status: new => assigned
Comment:
I can confirm this issue is reproducible.
Tested behavior:
- Django 5.2.x: `auto_now_add=True` DateTimeField is populated during the
`upload_to` callback.
- Django 6.0.x: the field value is None during `upload_to`, causing a
crash when accessed.
This appears to be a regression in Django 6.0, as the same code works
correctly in Django 5.2.
I will bisect to identify the commit where the behavior changed.
--
Ticket URL: <https://code.djangoproject.com/ticket/36847#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019b979c0274-ee6a407a-93a1-435f-9794-05f415ca9b23-000000%40eu-central-1.amazonses.com.