Opened 3 years ago

Closed 3 years ago

#21552 closed New feature (fixed)

Cannot use None as a query value for iexact lookup

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


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 3 years ago by Denis Moskalets

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

See the pull request, please:

comment:2 Changed 3 years ago by Tim Graham

Needs documentation: set
Triage Stage: UnreviewedAccepted
Type: BugNew 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 3 years ago by ANUBHAV JOSHI


comment:4 Changed 3 years ago by ANUBHAV JOSHI

See the pull request please:

comment:5 Changed 3 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

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