going from 2.2.x to 3.2 is three separate releases of django. That's alot
to go in one jump. Might help if you update one release at a time and
narrow down which version this regression is in.
In addition, I'd check the changelogs for each version and see what, if
any, might apply to your issue.
On Sunday, August 1, 2021 at 10:04:59 AM UTC-4 Tim Richardson wrote:
> 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/1328c62b-42a7-42f2-a20d-632a579d12f4n%40googlegroups.com.