Changes between Initial Version and Version 1 of Ticket #34144
- Timestamp:
- Nov 8, 2022, 4:41:07 AM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #34144 – Description
initial v1 6 6 django.db.utils.DataError: cannot cast jsonb string to type integer 7 7 }}} 8 9 It works with a SQLite database. 8 10 9 11 To reproduce the error, you can create a simple model with a JSONField: … … 22 24 {{{ 23 25 SELECT "myapp_mymodel"."id", 26 "myapp_mymodel"."data", 24 27 (("myapp_mymodel"."data" -> 'value'))::integer AS "actual_value" 25 28 FROM "myapp_mymodel" … … 31 34 {{{ 32 35 SELECT "myapp_mymodel"."id", 36 "myapp_mymodel"."data", 33 37 (("myapp_mymodel"."data" ->> 'value'))::integer AS "actual_value" 34 38 FROM "myapp_mymodel" 35 39 LIMIT 1; 36 40 }}} 37 38 The code is already working on SQLite.