#30704 closed Bug (fixed)

JSONField nested key and index transforms crash.

Reported by: felixxm Owned by: felixxm
Component: contrib.postgres Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

JSONField/HStoreField nested keys and indexes transforms crash when we pass expressions with parameters, e.g.

JSONModel.objects.annotate(
    key=KeyTransform('d', 'field'),
    expr=KeyTransform('f', KeyTransform('1', Cast('key', JSONField()))),
)

Separated from #30672 because it is not a regression.

Change History (2)

comment:1 Changed 10 months ago by felixxm

comment:2 Changed 10 months ago by GitHub <noreply@…>

Resolution: fixed
Status: assignedclosed

In c19ad2d:

Fixed #30704 -- Fixed crash of JSONField nested key and index transforms on expressions with params.

Thanks Florian Apolloner for the report and helping with tests.

Note: See TracTickets for help on using tickets.
Back to Top