#34754: CheckConstraint with isnull lookup on JSONField transform None into null
jsonb value
-------------------------------------+-------------------------------------
     Reporter:  Alexandre Collet     |                    Owner:  Simon
                                     |  Charette
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  4.2
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:  fixed
     Keywords:  constraint,          |             Triage Stage:  Ready for
  jsonfield, none, check             |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"3434dbd39d373df7193ad006b970c09c1a909ea3" 3434dbd3]:
 {{{
 #!CommitTicketReference repository=""
 revision="3434dbd39d373df7193ad006b970c09c1a909ea3"
 Fixed #34754 -- Fixed JSONField check constraints validation on NULL
 values.

 The __isnull lookup of JSONField must special case
 Value(None, JSONField()) left-hand-side in order to be coherent with
 its convoluted null handling.

 Since psycopg>=3 offers no way to pass a NULL::jsonb the issue is
 resolved by optimizing IsNull(Value(None), True | False) to
 True | False.

 Regression in 5c23d9f0c32f166c81ecb6f3f01d5077a6084318.

 Thanks Alexandre Collet for the report.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34754#comment:6>
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 on the web visit 
https://groups.google.com/d/msgid/django-updates/01070189bfc54ba8-37dbd60c-76d8-47ae-8a50-77837e7dfd30-000000%40eu-central-1.amazonses.com.

Reply via email to