#32483: querying JSONField in sqlite returns ints for booleans
-------------------------------------+-------------------------------------
     Reporter:  matthewcornell       |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  3.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  jsonfield querying   |             Triage Stage:  Accepted
  sqlite                             |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Rohith P R):

 * stage:  Unreviewed => Accepted


Comment:

 I was able to reproduce the issue:


 {{{
 from django.db import models


 class Messages(models.Model):
     json_field = models.JSONField()
 }}}


 {{{
 >>> from app.models import Messages
 >>> result = Messages.objects.values_list('json_field',
 'json_field__is_true')
 >>> print(result)
 <QuerySet [({'is_true': True}, 1)]>
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32483#comment:1>
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/072.78033845bb27a1df5088a4bb6de62ab1%40djangoproject.com.

Reply via email to