Opened 8 months ago

Closed 8 months ago

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

Download all attachments as: .zip

Change History (3)

Changed 8 months ago by Prasad Sidda

comment:1 Changed 8 months ago by Jani Tiainen

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 8 months ago by Jani Tiainen (previous) (diff)

comment:2 Changed 8 months ago by Tim Graham

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