#36847: FileField(upload_to=...) callback no longer sees `auto_now_add ` field
-------------------------------------+-------------------------------------
Reporter: Ran Benita | Owner: Nashrh
| Ashraf Khan
Type: Bug | Status: closed
Component: Documentation | Version: 6.0
Severity: Normal | Resolution: needsinfo
Keywords: upload_to, | Triage Stage:
auto_now_add | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Ran Benita):
Hi, thanks for looking.
> And testing both my view calling model.save() as well as the admin's add
form, gives me AssertionError for a missing created on all versions back
to 4.2.
Interesting, I just tried it now with a fresh project and I don't get an
assertion error on 5.2.10, but I do get it on 6.0.
I was able to bisect it to the following commit, which seems related:
{{{
commit 94680437a45a71c70ca8bd2e68b72aa1e2eff337
Author: Simon Charette <[email protected]>
Date: Wed Mar 19 01:39:19 2025 -0400
Fixed #27222 -- Refreshed model field values assigned expressions on
save().
Removed the can_return_columns_from_insert skip gates on existing
field_defaults tests to confirm the expected number of queries are
performed and that returning field overrides are respected.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36847#comment:5>
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/0107019b991de6ff-933265bf-891e-452a-8925-3b743988b12a-000000%40eu-central-1.amazonses.com.