Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#28904 closed Bug (duplicate)

QuerySet.exclude() doesn't work properly with __in and a list containing None

Reported by: Prasad Sidda Owned by: nobody
Component: Database layer (models, ORM) Version: 1.8
Severity: Normal Keywords: __in=[None], in with None
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

Excluding query with __in condition by providing [None]` as list.

Please find attachment below.

Attachments (1)

Screen Shot 2017-12-06 at 4.17.12 PM.png (232.6 KB ) - added by Prasad Sidda 6 years ago.

Download all attachments as: .zip

Change History (3)

by Prasad Sidda, 6 years ago

comment:1 by Jani Tiainen, 6 years ago

Resolution: invalid
Status: newclosed

This is actually how SQL works. None will be translated to NULL and NULL is compared to any value is undefined in SQL.

Closing ticket as invalid.

Version 0, edited 6 years ago by Jani Tiainen (next)

comment:2 by Tim Graham, 6 years ago

Component: UncategorizedDatabase layer (models, ORM)
Description: modified (diff)
Resolution: invalidduplicate
Summary: Queryset exclude not working properlyQuerySet.exclude() doesn't work properly with __in and a list containing None

Duplicate of #20024.

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