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?


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" 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-users/45582bbb-6ec7-4655-a868-bc0dadf3e843n%40googlegroups.com.

Reply via email to