Changes between Initial Version and Version 1 of Ticket #34144


Ignore:
Timestamp:
Nov 8, 2022, 4:41:07 AM (2 years ago)
Author:
Clément Escolano
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34144 – Description

    initial v1  
    66django.db.utils.DataError: cannot cast jsonb string to type integer
    77}}}
     8
     9It works with a SQLite database.
    810
    911To reproduce the error, you can create a simple model with a JSONField:
     
    2224{{{
    2325SELECT "myapp_mymodel"."id",
     26       "myapp_mymodel"."data",
    2427       (("myapp_mymodel"."data" -> 'value'))::integer AS "actual_value"
    2528FROM "myapp_mymodel"
     
    3134{{{
    3235SELECT "myapp_mymodel"."id",
     36       "myapp_mymodel"."data",
    3337       (("myapp_mymodel"."data" ->> 'value'))::integer AS "actual_value"
    3438FROM "myapp_mymodel"
    3539LIMIT 1;
    3640}}}
    37 
    38 The code is already working on SQLite.
Back to Top