#21552 closed New feature (fixed)

Cannot use None as a query value for iexact lookup

Reported by: denya Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords:
Cc: anubhav9042 Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Current behavior is "None is interpreted as an SQL NULL, but only in exact queries."
iexact=None lookup fails now. It's wrong behavior.
iexact=None lookup must behave like exact=None query.

Change History (5)

comment:1 Changed 15 months ago by denya

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

See the pull request, please:
https://github.com/django/django/pull/2020

comment:2 Changed 15 months ago by timo

  • Needs documentation set
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Bug to New feature

I'm not sure if iexact was intentionally omitted when the feature for exact was added in the QuerySet refactor branch, but I don't see a reason not to have it.

It would be good to update the documentation (.. verisonchanged:: for iexact and a mention in the release notes).

comment:3 Changed 15 months ago by anubhav9042

  • Cc anubhav9042 added

comment:4 Changed 15 months ago by anubhav9042

See the pull request please:
https://github.com/django/django/pull/2088

comment:5 Changed 15 months ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from new to closed

In d4e578d0f64971483ded49f9cae460ea174b5138:

Fixed #21552 -- Allowed the use of None for the iexact lookup.

Thanks Anubhav Joshi for the documentation.

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