#36419: bulk_update() incorrectly updates JSONField None to JSON 'null' instead of
SQL NULL
-------------------------------------+-------------------------------------
Reporter: Clifford Gama | Owner: Clifford
| Gama
Type: Bug | Status: closed
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce <42296566+sarahboyce@…>):
* resolution: => fixed
* status: assigned => closed
Comment:
In [changeset:"c1fa3fdd040718356e5a3b9a0fe699d73f47a940" c1fa3fdd]:
{{{#!CommitTicketReference repository=""
revision="c1fa3fdd040718356e5a3b9a0fe699d73f47a940"
Fixed #36419 -- Ensured for_save was propagated when resolving
expressions.
The for_save flag wasn't properly propagated when resolving expressions,
which
prevented get_db_prep_save() from being called in some cases. This
affected
fields like JSONField where None would be saved as JSON null instead of
SQL NULL.
Regression in 00c690efbc0b10f67924687f24a7b30397bf47d9.
Thanks to David Sanders and Simon Charette for reviews.
Co-authored-by: Adam Johnson <
m...@adamj.eu>
}}}
--
Ticket URL: <
https://code.djangoproject.com/ticket/36419#comment:11>