#31956: QuerySet.order_by() chained with values() crashes on JSONField with a
custom decoder on PostgreSQL.
-------------------------------------+-------------------------------------
Reporter: Marc DEBUREAUX | Owner: felixxm
Type: Bug | Status: closed
Component: Database layer | Version: 3.1
(models, ORM) |
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Agris Ameriks):
Sorry, I will add comment to already created bug for the regression
(#31973).
Yes, I simplified the query that I have. It is much complex and it's much
harder to implement it in ORM.
I think that JSONField should return the dict either way and it was
working fine in 3.1.
Also the bug is related to "with a custom decoder", but in current
scenario I'm not specifying different decoder.
Yes, I can use `json.loads()` and I was using it till Django started
supporting JSONField with built-in decoder (not sure which version, but
long time ago). I don't think that it is ok to return to "unsupporting"
default behavior.
Replying to [comment:10 felixxm]:
> Please don't reopen closed tickets. You should create a new ticket if
you want to report a regression. Moreover we're aware of this behavior
change. Is there any reason to use a row cursor and SQL instead of the
ORM? You can always use `json.loads()` on fetched data.
--
Ticket URL: <https://code.djangoproject.com/ticket/31956#comment:11>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates/064.362110d7fd546351b4281c8b2ce60799%40djangoproject.com.