#36508: Asymmetry between exact and iexact when filtering JSON keys against None
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Type: Bug
Status: new | Component: Database
| layer (models, ORM)
Version: 5.2 | Severity: Normal
Keywords: null, jsonfield | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
`exact` and `iexact` vary in their treatment of `None` when looking up
JSON key paths:
{{{
optional_param = request.GET.get("param")
qs1 = Model.objects.filter(json__key=optional_param)
qs2 = Model.objects.filter(json__key__iexact=optional_param)
}}}
[https://dryorm.xterm.info/json-key-filter-none/run fiddle] showing
`exact` queries return rows where the json key is null, but `iexact`
queries do not (instead, they check for key existence, e.g.
`__key__isnull`)
Previous ticket regarding symmetry between `exact` and `iexact`: #21552
Previous ticket regarding `iexact` on JSON key lookups: #27693
--
Ticket URL: <https://code.djangoproject.com/ticket/36508>
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 visit
https://groups.google.com/d/msgid/django-updates/010701980ea60883-9947a72f-1518-4cee-8c10-f57bf171b76d-000000%40eu-central-1.amazonses.com.