#36453: 5.2.3 introduces a regression when using `Value(None,
output_field=JSONField()` in a `When` clause.
-------------------------------------+-------------------------------------
     Reporter:  Thomas               |                    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:"1d89691c7481fbcef6a7bc396e41a651372c1cf3" 1d89691]:
 {{{#!CommitTicketReference repository=""
 revision="1d89691c7481fbcef6a7bc396e41a651372c1cf3"
 [5.2.x] Fixed #36453 -- Made When.condition resolve with for_save=False.

 Value(None, JSONField()) when used in When.condition incorrectly resolved
 with
 for_save=True, resulting in the value being serialized as SQL NULL instead
 of
 JSON null.

 Regression in c1fa3fdd040718356e5a3b9a0fe699d73f47a940.

 Thanks to Thomas McKay for the report, and to David Sanders and Simon
 Charettes
 for the review.

 Co-authored-by: Sarah Boyce <42296566+sarahbo...@users.noreply.github.com>

 Backport of 104cbfd44b9eff010daf0ef0e1ce434385855b13 from main.
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36453#comment:10>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019777e6f979-ee1b5ba3-0f64-4239-8f5e-6ae4d3de6bea-000000%40eu-central-1.amazonses.com.

Reply via email to