#20024: QuerySet.exclude() does not work with lists containing a 'None' element. -------------------------------------+------------------------------------- Reporter: stillwater.ke@… | Owner: Adam | Sołtysik Type: Bug | Status: assigned Component: Database layer | Version: master (models, ORM) | Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by Simon Charette):
* cc: Simon Charette (added) Comment: Thanks for surfacing this inconsistency Adam. It looks like adding an `else` clause to deal with a ''query'' right hand side value that has explicitly selected fields that can be null (primary keys can't) https://github.com/django/django/blob/632ccffc49658de5348c51a8918719364be54f37/django/db/models/lookups.py#L387-L389 The `RelatedIn` lookup will also need to be adjusted https://github.com/django/django/blob/e74b3d724e5ddfef96d1d66bd1c58e7aae26fc85/django/db/models/fields/related_lookups.py#L98-L99 -- Ticket URL: <https://code.djangoproject.com/ticket/20024#comment:9> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/081.8feb69ead65407e79f28f29d610d9ca8%40djangoproject.com.