Opened 11 years ago

Closed 11 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: dev
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

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

Has patch: set

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

comment:2 by Tim Graham, 11 years ago

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 by ANUBHAV JOSHI, 11 years ago

Cc: ANUBHAV JOSHI added

comment:4 by ANUBHAV JOSHI, 11 years ago

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

comment:5 by Tim Graham <timograham@…>, 11 years ago

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