Opened 7 years ago

Closed 7 years ago

Last modified 7 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 7 years ago.

Download all attachments as: .zip

Change History (3)

by Prasad Sidda, 7 years ago

comment:1 by Jani Tiainen, 7 years ago

Resolution: invalid
Status: newclosed

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

Closing ticket as invalid.

Last edited 7 years ago by Jani Tiainen (previous) (diff)

comment:2 by Tim Graham, 7 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