Simplified QuerySet field.null handling #21

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
1 participant
@akaariai
Member

akaariai commented Apr 29, 2012

QuerySet had previously some complex logic for dealing with nullable
fields in negated add_filter() calls. It seems the logic is leftover
from a time where the WhereNode wasn't as intelligent in handling
field__in=[] conditions.

All tests passed on SQLite. I believe all tests should pass on other
backends, too.

The reason why this should be fixed is that it is very hard to see what
is happening in the negated field.null case currently. I hope this patch
makes the logic and why the condition is added clearer

Simplified QuerySet field.null handling
QuerySet had previously some complex logic for dealing with nullable
fields in negated add_filter() calls. It seems the logic is leftover
from a time where the WhereNode wasn't as intelligent in handling
field__in=[] conditions.
@akaariai

This comment has been minimized.

Show comment
Hide comment
@akaariai

akaariai Apr 29, 2012

Member

I pushed the patch manually by git push - no need for this pull request any more.

Member

akaariai commented Apr 29, 2012

I pushed the patch manually by git push - no need for this pull request any more.

@akaariai akaariai closed this Apr 29, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment