Database is postgresql 12
psycopg2-binary==2.8.6 \
The bug occurs when I move from django 2.2.* to 3.2.5
A raw sql query is now behaving differently. A result that was previously deserialised from a jsonb field into a python dict now returns a string (and breaks things).
this is a simplifed version of my query:
sql = """select
jsonb_array_elements(cached_dear_dearcache.jdata#>'{Fulfilments}')->'Pick' as picks
from cached_dear_dearcache
"""
jdata is a jsonb field.
picks should be a dict, eg
{"Lines":[{...line1...},{...line2...}]
this has always worked; this django project has always been on 2.2.x
I use this code in production on a variety of postgresql datbase from v 9.6 to v12.
As soon as I update to 3.2.5, I no longer get a dict. Instead, I get a string which is json.
I have downgraded to 2.2 since this is major problem.
Is it a bug or have I missed something?