#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
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

 In [changeset:"6fc620b4a8e91839b93af2b52d80bdbd5f8a1fcc" 6fc620b4]:
 {{{#!CommitTicketReference repository=""
 revision="6fc620b4a8e91839b93af2b52d80bdbd5f8a1fcc"
 [5.2.x] 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 <[email protected]>

 Backport of c1fa3fdd040718356e5a3b9a0fe699d73f47a940 from main.
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36419#comment:12>
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/0107019745e84dbc-382ec68e-ecbb-4039-93cd-6ddc11bb336f-000000%40eu-central-1.amazonses.com.

Reply via email to